What is the purpose of the "static" keyword in Java?
A. To indicate that a method or variable belongs to the class, rather than to an instance of the class.
B. To indicate that a method or variable can only be accessed within the class.
C. To indicate that a method or variable is final and cannot be changed.
D. None of the above
Answer:A
What is the purpose of the "static" keyword in Java?
A. To indicate that a method or variable belongs to the class, rather than to an instance of the class. B. To indicate that a method or variable can only be accessed within the class. C. To indicate that a method or variable is final and cannot be changed. D. None of the above