InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 51. |
If a declaration of a member in inner class has the same name as that in the outer class, then ________________ enclosing scope.(a) Outer declaration shadows inner declaration in(b) Inner declaration shadows outer declaration in(c) Declaration gives compile time error(d) Declaration gives runtime errorI have been asked this question in class test.I'd like to ask this question from Nested Class topic in portion Class Members & Types of Object Oriented Programming |
|
Answer» Correct choice is (B) Inner declaration shadows outer declaration in |
|
| 52. |
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 |
|