What is the difference between inner class and subclass?

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.

Sizin İçin Seçtik  What is difference between class and subclass in Java?

Leave a Reply

Your email address will not be published. Required fields are marked *