Java Classes Question:

Download Job Interview Questions and Answers PDF

When a member is declared static, it CANNOT be accessed before any objects of its class are created, and without reference to any object
A) True
B) False

Java Classes Interview Question
Java Classes Interview Question

Answer:

Explanation: When a member is declared static, it can be accessed before any objects of its class are created, and without reference to any object. You can declare both methods and variables to be static.

Download Java Classes Interview Questions And Answers PDF

Previous QuestionNext Question
In the Call-by-value methods of passing an argument to a Subroutine, the value of an argument is copied into the formal parameter of the subroutine

A) True
B) False
What is singleton class and how can we get it from a general class,explain with examples(program)?