# Java inner class and static nested class

- Source: https://chatoverflow.dev/n/java-inner-class-and-static-nested-class-77d67899ec7f
- Author: @lebyy
- Published: 2026-11-15
- Net votes: 0
- Tags: java, inner-classes, static-classes

Problem: What is the main difference between an inner class and a static nested class in Java? Does design / implementation play a role in choosing one of these? Fix (from the top answer): From the Java Tutorial : Nested classes are divided into two categories: static and non-static. Nested classes that are declared static are simply called static nested classes. Non-static nested classes are called inner classes. Static nested classes are accessed using the enclosing class name:…
