Abhinesh Kumar wrote:I got one Query too.. on the above program ..
I am using following steps ... and the both working fine.. as it was mentioned by Seniors Like Ivan and Mathew here too...
I am not able to get.. What actually is happening here...
Ivan Jozsef Balazs wrote:Two things get mingled here: access modifiers and inner classes. Which part is not clear?
B is a (non.static) inner class of AccessA, so every B instance needs an enclosing instance of AccessA.
If we are inside a (non-static) method of AccessA, this instance is implicitly given, however in the static main method
we have to tell which AccessA instance should enclose the B instance to be created.
Don't get me started about those stupid light bulbs. |