sivanagaswathi kallam wrote:Can someone where exactly inner classes used in job.
Just to add to Joe's excellent explanation: In addition to true "inner" classes; ie:
public OuterClass {
public InnerClass {
you also have
nested classes, viz:
public OuterClass {
public static InnerClass {
and these are more common - and also more usually
public.
Basically, it's just a regular class that only has a context when used with the "outer" class - as, for example:
Car.Wheel - because if you just defined it on its own,
Wheel could be a wheel for anything.
HIH
Winston