JavaIntermediate#inner-classes

What is the difference between a static nested class and a non-static inner class?

A static nested class doesn't hold an implicit reference to an outer instance and can be instantiated independently. A non-static inner class holds an implicit reference to its enclosing instance and requires one to be created.

Example
class Outer {
  static class StaticNested {}
  class Inner {}
}
Outer.StaticNested sn = new Outer.StaticNested();
Outer o = new Outer();
Outer.Inner in = o.new Inner();

Related Questions

1
JavaIntermediate#inner-classes

What are anonymous inner classes used for?

Open
2
JavaIntermediate#inner-classes

What is a local class in Java?

Open
3
JavaBeginner#fundamentals

What is the difference between an enum and a class with constants?

Open