posted 25 years ago
Inner class can be used when we want to do some work within the scope of the other class and it need not exist seperately. A good example is creating a linked list class. To create a linked list class, we need to create a node. This node can be an inner class.
Sub classes are classes which derives from the other class (parent class) to provide more specific functionality.
Hope this helps
Ram