Static classes are basically a way of grouping classes together in Java . Java doesn’t allow you to create top-level static classes; only nested (inner) static classes. … We don’t need an instance of the outer class to create an object of a static inner class.