How to use Nested Classes?

class Outside {

public class Inside {
}
}

public class MainClass {
public static void main(String[] arg) {
Outside outer = new Outside();
Outside.Inside inner = outer.new Inside();
}
}

output

Nested Classes