I came across this questions on one of the online Java Tests. The options were 4,5,8 and any number of times.
I have only used one inner class, but have never tried multiple ones. I was wondering if anyone knows the answer.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I tried on my own: The answer is any number of times. The following is my test class, I had no compilation errors.
public class Test { public Test () { } public static void main (String args[]) { new Test (); } class Test2 { class Test3 { class Test4 { class Test5{ class Test6{ class Test7{ class Test8{ class Test9 { } } } } } } } } }