There is no any class inside another class, This source code has two class seperately. We can write many classes inside a single source code. easy of transport could be the reason. Note that when you write multiple classes in the same source code, you can only define one public class and its name should match with the file name of the source code.
solved Java 2 classes in one class? [duplicate]