继承
父类比较笼统,共性特征
overload & overwrite 重写
方法重载 不允许 不同返回类型 相同方法名
int add(int a , int b);
long add(int a, int b); 错误
重载是同一个类里面吗? animals 2, 3
eg:
Customer un =new VipCustomer();
isVip()
调用Customer 的方法 前面声明
instanceof 后面行为
构造器重载问题
create user jiumao identified by Jobmate1212--,创建用户,用户名是A,密码是Apassword
grant connect,resource to jiumao --授予connect权限
父类比较笼统,共性特征
overload & overwrite 重写
方法重载 不允许 不同返回类型 相同方法名
int add(int a , int b);
long add(int a, int b); 错误
重载是同一个类里面吗? animals 2, 3
eg:
Customer un =new VipCustomer();
isVip()
调用Customer 的方法 前面声明
instanceof 后面行为
构造器重载问题
create user jiumao identified by Jobmate1212--,创建用户,用户名是A,密码是Apassword
grant connect,resource to jiumao --授予connect权限