Originally Posted by D.Thume
If we use same name for Inner Class and Outer Class member, and if we are using the same member in Inner Class, then we can differentiate that member by using Inner and Outer Class names.
Example : If a variable int i declared in Inner Class and Outer Class, and
If we are referring Inner Class Member, we can refer as this.i ;
If we are referring Outer Class Member, we can refer as OuterClassName.this.i ;
Visit my Facebook Group on the Biblewheel:
There are currently 1 users browsing this thread. (0 members and 1 guests)
View Tag Cloud