I was doing one mock exam question which is non static member class.
The above program, that ppp() constructor works fine.But I changed that program in method local class.this time,the constructor ppp() is not working.How come the non static member class is working and method local class is not working?
The above program, that ppp() constructor works fine.But I changed that program in method local class.this time,the constructor ppp() is not working.How come the non static member class is working and method local class is not working?
The same reason why a constructor can't access a local variable of a method -- it is not in scope.