Tuesday, 24 July 2018

Summary table of Java Modifiers and Access Specifiers.
  • The only applicable modifier for the local variable is final.
  • The only applicable modifiers for constructor are public, private, default, protected.
  • The modifiers which are applicable only to the method is native.
  • The modifiers which are applicable only for variables volatile and transient.
  • The modifiers which are applicable for classes but not for an interface is final.
  • The modifier which is applicable for classes but not for enum is final, abstract.


No comments:

Post a Comment