Hi Guys,
Can anyone help me out in finding the use of Method Local Inner class.
I couldn't able to find the use of Method Local Inner class in Practical ways.
For Reference I have displayed the Code from K & B book:
class MyOuter2 {
private
String x = "Outer2";
void doStuff() {
class MyInner {
public void seeOuter() {
System.out.println("Outer x is " + x);
} // close inner class method
} // close inner class definition
MyInner mi = new MyInner(); // This line must come
// after the class
mi.seeOuter();
} // close outer class method doStuff()
} // close outer class