Multiple choice technology programming languages

Which one is true :

  1. interface declares constant and instance variables.

  2. The abstract modifier can be combined with the static modifier .

  3. native modifier can be applied only on method.

  4. synchronized modifier can be applied to method as well as class.

  5. none of these

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The native modifier in Java is used to indicate that a method is implemented in platform-dependent code (like C/C++), so it applies only to methods. Interfaces cannot have instance variables, abstract and static are mutually exclusive, and classes cannot be marked as synchronized.