Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.
Class Outer{int a;Outer (){a=10;}public static void main(String args[]){final Outer o1=new Outer();Outer o2=new Outer();class inner{inner(){o1.a=20;//allowed//o2.a=30; not allowed}}}}Why inner classes can access only final variables as illustrated? Thanks in advance!
Profile Answers by sunil_dalvi82 Questions by sunil_dalvi82
Questions by sunil_dalvi82 answers by sunil_dalvi82
Related Answered Questions
Related Open Questions