Some languages, such as C++ or Java, allow a class definition to be nested inside another class definition. This feature can be very useful in controlling the encapsulation of implementation details. Whether the inner class can access features defines in the outer class is different in different langauges; for example they can in Java, but they cannot in C++. This makes the utilization of this feature very different in the two languages. We will see examples of this in later chapters.