+ 2
What is the difference between an Inner Class and a Sub-Class?
3 Answers
+ 6
There are big differences between inner classes and subclasses:
inner classes are in the same file, whereas subclasses can be in another file, maybe in another package.
You cannot get an instance of an inner class without an instance of the class that contains it.
inner classes have the methods they want, whereas subclasses have the methods of their parent class. Subclasses can of course define additional methods, but they'll always have those of their parent.
+ 1
Inner class lies within the same class. while Sub class may may reside as a child class in inheritence
0
sorry sir can u send me sub class.