package nice;
abstract class Abs {
public abstract void f(int x);
public abstract void g(int x,int y);
public abstract void h(double x);
}
class F extends Abs {
public void f(int x) {
System.out.println("f: "+x);
}
public void g(int x,int y){
}
public void h(double x){
}
}
class G extends Abs {
public void f(int x) {
}
public void g(int x,int y){
System.out.print("g: "+x+" , ");
System.out.println(y);
}
public void h(double x){
}
}
class H extends Abs {
public void f(int x) {
}
public void g(int x,int y){
}
public void h(double x){
System.out.println("h: "+x);
}
}
public class Abstract {
public static void main(String[]args) {
Abs fAbs = new F();
fAbs.f(10);
Abs gAbs = new G();
gAbs.g(12,13);
Abs hAbs = new H();
hAbs.h(20.0);
}
}