public class Outside {
// Nested class
public class Inside {
// Details of Inside class...
}
// More members of Outside class...
}
Static Nested Classes
To make objects of a nested class type independent of objects of the enclosing class type, you can declare the nested class as static. A static nested class can have static members, whereas a non-static nested class cannot.
To demonstrate the use of a nested class I created a partial implementation of a LinkedList, click here to download the code.
No comments:
Post a Comment