1.

Which access specifier is used when no access specifier is used with a member of class (java)?(a) Private(b) Default(c) Protected(d) PublicThis question was posed to me during an online interview.Enquiry is from Access Specifiers in chapter Access Specifiers of Object Oriented Programming

Answer»

The correct option is (b) DEFAULT

Easiest explanation - Default ACCESS is used if the programmer doesn’t specify the SPECIFIER. This ACTS in a similar way as that of private. But since NOTHING is specified we call it to default access.



Discussion

No Comment Found

Related InterviewSolutions