KnowledgeBoat Logo
|

Computer Applications

A static variable …………… .

  1. is preceded by static keyword in the declaration
  2. is accessed via the class name
  3. is also known as a class variable
  4. All of the above

Encapsulation & Inheritance in Java

1 Like

Answer

All of the above

Reason — A static variable is preceded by static keyword in the declaration. It belongs to the class and hence, it is called a class variable and is accessed via the class name.

Answered By

3 Likes


Related Questions