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

Home > Java Programming > Inner Classes > Questions and Answers

Q: Given below the sample code :
class Demo{
demo() {
}
public class Demo {
funtion() { }
}
}
How can we correct the above code? Select appropriate option :
A. inner class should be declare as "static" B. inner class must also declared it's constructor.
C. change the name of the inner class. D. no need of correction

Answer and Explanation

Answer:change the name of the inner class.

Explanation:
An inner class can't have the same name as its enclosing class.

Comment on this Question

Name:

Loading...




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