Sahil Rally wrote:I have read a line in Khalid Mughal and it states that
"Nested Interfaces are always static ".
I executed the following and it compiled okay.
Please do confirm the above statement, is it wrong or wrongly interpreted by me ???
Thanks !!!
2) Please do consider statement
" No other static memebers, except final static fields, can be declared within a non-static member class"
This statement is given Correct. But i tried the follwing code snippet and it failed to compile.
So, please do confirm this statement too.... In my consideration , the above statement is false.
Thanks !!!
Your first question isn't clear..
For the second, It's the problem related with the initialization of final fields.... Not related to the inner class...
Final variable should be initialized when the declared or in every Constructor of the class
Hope this helps~!