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

Option A is false because interfaces only declare constants (static final), not instance variables. Option B is false because abstract and static cannot be combined - abstract methods must be overridden in subclasses, but static methods belong to the class. Option C is true - the native modifier can only be applied to methods (indicating implementation in native code like C/C++). Option D is false because synchronized applies to methods and code blocks, not to classes.