I'm moving this to Java in General (beginner), where it seems to fit better.
"I'm not back." - Bill Harding, Twister
Joined: Jan 30, 2000
This actually has nothing to do with inner classes - this code wouldn't work in an outer class either. In order to overload a method, you must have different arguments in the method. Both your disp() methods have the exact same arguments - none. So it's not an overload. It's not an override either, because both methods are in the same class, and have different return types.
subject: Why we Can't overload mehtods in inner classes ?