fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6. abstract class Ab{ public int getN(){return 0;}}
  7. class Bc extends Ab{ public int getN(){return 7;}}
  8. class Cd extends Bc { public int getN(){return 47;}}
  9. class Test{
  10. public static void main(String[] args) {
  11. Cd cd=new Cd();
  12. Bc bc=new Cd();
  13. Ab ab=new Cd();
  14. System.out.println(cd.getN()+" "+
  15. bc.getN()+" "+ab.getN()); }}
Success #stdin #stdout 0.21s 54068KB
stdin
Standard input is empty
stdout
47 47 47