Multiple choice technology programming languages

Which of the following are true. Select the three correct answers.

  1. A static method may be invoked before even a single instance of the class is constructed.

  2. A static method cannot access non-static methods of the class.

  3. Abstract modifier can appear before a class or a method but not before a variable.

  4. final modifier can appear before a class or a variable but not before a method.

  5. Synchronized modifier may appear before a method or a variable but not before a class.

Reveal answer Fill a bubble to check yourself
A,B,C Correct answer
Explanation

A: True - static methods belong to the class, not instances, so they can be called before any object is created. B: True - static methods cannot directly access instance members (non-static methods/fields) without an object reference. C: True - abstract can modify classes and methods, but not variables. D is false because final CAN modify methods (to prevent overriding). E is false because synchronized only modifies methods or code blocks, not variables.