1.

A static nested class is _____________ class in behavior that is nested in another _________ class.(a) Top level, top level(b) Top level, low level(c) Low level, top level(d) Low level, low levelThe question was asked in a job interview.Enquiry is from Nested Class in portion Class Members & Types of Object Oriented Programming

Answer»

Right option is (a) Top level, top level

The explanation: Top level CLASS encloses the other classes or have same preference as that of other top level classes. Having a class inside the top level class is INDIRECTLY having a top level class which HIGHER DEGREE of encapsulation.



Discussion

No Comment Found

Related InterviewSolutions