Inner classes are like a full fledged member of the enclosing class. Similarly, can we conclude that a method-local inner class is like a local variable? Further, can we treat it like a local variable?
Similarly, can we conclude that a method-local inner class is like a local variable? Further, can we treat it like a local variable?
Not sure what you mean by treating a inner class like a local variable. One is a class definition and the other is a reference variable. You can certain assign an instance of an method inner class to a local variable, but you can also assign this instance to a instance or class variable too (Although, in these later cases, you will need to hold it in a super class to the inner class, as the inner class type will not be in scope).