1.

What are the restrictions applied to Java static methods?

Answer»

The following are the RESTRICTIONS applied to STATIC METHODS in Java:

  • Static method can access only static TYPE data.
  • These methods cannot invoke non-static method directly.
  • The ‘this’ and ‘super’ cannot be used in static context.
  • You can’t override static methods in a subclass


Discussion

No Comment Found