Question

In Java which of the following statements about the "static" keyword is incorrect?

A A static method can directly access non-static (instance) variables
B A static method can be called without creating an object
C A static method can access static variables directly
D Static variables are shared across all instances of a class
E A static block executes only once, when the class is loaded
Practice Next

Hey! Ask a query