KnowledgeBoat Logo
|

Computer Applications

A member variable declared with no access specifier has visibility in …………… .

  1. Class and package only
  2. Class, package and subclass only
  3. Class and subclass only
  4. Class only

Encapsulation & Inheritance in Java

3 Likes

Answer

Class and package only

Reason — A member variable declared with no access specifier has visibility in the same class and other classes of the same package only.

Answered By

1 Like


Related Questions