Divyya Joshi wrote:The following code is related to regular inner class and the moment i try to access private member variable of inner class compiler complains error but Not when private member is acessed
Here's the code
Anyone kindly explain this absurd behaviour .
It's not absurd behavior - on line 7 you have "private x=10;" you have forgotten to set the datatype ... int I presume? Where you have marked error the 'x' has not been declared properly because of what I said in the beginning.