fork download
  1. class Alpha {
  2. public static void main(String[] args) {
  3. Alpha f = new Beta();
  4. System.out.println(f.test(3));
  5. }
  6. String test(int i) {
  7. return (i + 2) + " ";
  8. }
  9. }
  10. class Beta extends Alpha {
  11. String test(int i) {
  12. return (i + 1) + " ";
  13. }
  14. String test(long i) {
  15. return i + " ";
  16. }
  17. }
  18.  
Success #stdin #stdout 0.08s 212416KB
stdin
Standard input is empty
stdout
4