A class’s instance data are the variables declared in the main method.

A class’s instance data are the variables declared in the main method.


Answer: False. A class’s instance data are declared in the class but not inside any method. Variables declared in a method are local to that method and can only be used in that method. Furthermore, every class need not have a main method.


Java

Learn More Multiple Choice Question :