Welcome Guest | Sign in | Register
Inner Classes - Discussion Page For Q.3037 | Java Programming Questions and Answers | Java Programming Free Online-Tests | LucentBlackBoard | LucentBlackBoard.com

Home > Java Programming > Inner Classes > Questions and Answers

Q: What is the true about the bellow code
class Outer {
static class Inner { }
}
A. Inner class can be accessed without having an instance of the outer class. B. .Inner class can't be accessed without having an instance of the outer class.
C. Compile error D. None of the above

Answer and Explanation

Answer:Inner class can be accessed without having an instance of the outer class.

Explanation:
Static Inner class can be accessed without having an instance of the outer class. This is like other static members.

Comment on this Question

Name:

Loading...




Partner Sites
LucentBlackBoard.com                  SoftLucent.com                  LucentJobs.com
All rights reserved © 2012-2015 SoftLucent.