Introduction to OOP Chapter 4: Classes and Methods: next previous audio real text

Inner or Nested Classes

Some languages (C++ or Java) allow a class definition to be given inside another class definition. Whether the inner class can access features of the outer class is different in different languages.

class LinkedList {

	...
	private class Link { // inner class
		public int value;
		public Link next;
	}
}

Intro OOP, Chapter 4, Slide 31