0
How to extend a class in learn java?
1 Respuesta
+ 1
class A{
int a;
String b;
void get(){
//your logic
}
}
Class B extends A{
int c;
String Address;
void Show(){
//your logic
}
}
here the class B is child class which extends its super class which is class A.
it means class B have all the variable and method of class A and its method and variable also.