What is the difference between an instance variable and a class variable in Java?
A. An instance variable is shared among all instances of a class, while a class variable is not.
B. An instance variable is declared with the "static" keyword, while a class variable is not.
C. An instance variable is created when an object is instantiated, while a class variable is created when the class is loaded.
D. None of the above.
Answer:C
What is the difference between an instance variable and a class variable in Java?
A. An instance variable is shared among all instances of a class, while a class variable is not. B. An instance variable is declared with the "static" keyword, while a class variable is not. C. An instance variable is created when an object is instantiated, while a class variable is created when the class is loaded. D. None of the above.