fork download
  1. interface Animal { void makeNoise(); }
  2. class Horse implements Animal {
  3. Long weight = 1200L;
  4. public void makeNoise() { System.out.println("whinny"); }
  5. }
  6. class Icelandic extends Horse {
  7. public void makeNoise() { System.out.println("vinny"); }
  8. public static void main(String[] args) {
  9. Icelandic i1 = new Icelandic();
  10. Icelandic i2 = new Icelandic();
  11. Icelandic i3 = new Icelandic();
  12. i3 = i1; i1 = i2; i2 = null; i3 = i1;
  13. }
  14. }
Success #stdin #stdout 0.08s 50924KB
stdin
Standard input is empty
stdout
Standard output is empty