Is nested class allowed in Java?

In Java, just like methods, variables of a class too can have another class as its member. Writing a class within another is allowed in Java . The class written within is called the nested class, and the class that holds the inner class is called the outer class. Following is the syntax to write a nested class.

Read more