What is class variable?

The two @ characters at the beginning of the variable name is called class variable. See an example below:

 @@date_today = 10

Here @@date_today is  a class variable.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.