(I gave your code sample a little formatting so it would be easier to understand) Q1) Inner class declarations and class initialization blocks. Q2) You could just copy this program into a couple of .java files, compile and run... In my head, I think the answer will be 5.
Hi, I think i have two findings in your code. First, the variable c is an instance variable in TestIt and can not be accessed inside a static method like main. Second, even if we declare/define 'c ' inside main then we encounter the problem "Can't assign a value to a final variable: c" So, to me, the question looks like a wrong one. What do you think? Rgds, Saravanan