If we can create an object(instance) of a class then that class is called instantiated.
Inherited mean we get all the functionality (all of attributes, properties, and methods) of that class which is inherited to new class.
In java there are three types of classes----
1.concrete class:A class that can be instantiated and also can be inherited is called as concrete class.
All class are by default concrete.
2.Abstract class: A class that can never be instantiated and can be inherited is called as abstract class.
Such classes must have abstract keyword associated with them.
3.Final class: A class that can be instantiated and can never be inherited is called as final class.
Use final keyword to make such a class.




No comments:
Post a Comment