1.

Which is the modifier when there is none mentioned explicitly?(a) protected(b) private(c) public(d) defaultThe question was posed to me by my college director while I was bunking the class.Question is taken from Access Control in division Classes and Methods of Java

Answer»

Right option is (d) default

Explanation: Default is the ACCESS MODIFIER when none is DEFINED explicitly. It means the member (METHOD or VARIABLE) can be accessed within the same package.



Discussion

No Comment Found

Related InterviewSolutions