public class Father {
private double property=90;
/**
* @param args
*/
public static void main(String[] args) {
Father son = new Son();
System.out.println("My father's property is = "+son.property++);
System.out.println("My father's property is = "+son.property);
}
}
class Son extends Father{
public double property;
public void addProperty(double fund){
property += fund;
}
}
private double property=90;
/**
* @param args
*/
public static void main(String[] args) {
Father son = new Son();
System.out.println("My father's property is = "+son.property++);
System.out.println("My father's property is = "+son.property);
}
}
class Son extends Father{
public double property;
public void addProperty(double fund){
property += fund;
}
}