==Syntax
class Base {
....
}
class Drived extends Base {
....
}
==Usage:
-adding new properties and methods
-overriding base properties and mehtods
==Note:
-no-argument construct of base class is called automatically, can called explicitly by super();
-has-argument constract of base class must be called explicitly at the first line of constructor of derived class
-derived class can extends only one base class
-derived class can only access public member and method of base class
没有评论:
发表评论