fork download
  1. class Horse {
  2. Long longSmall = 12L;
  3. Long longLarge = 1200L;
  4.  
  5. public Horse() {
  6. System.out.println("longSmall is:" + System.identityHashCode(longSmall));
  7. System.out.println("longLarge is:" + System.identityHashCode(longLarge));
  8. System.out.println("----------------------");
  9. }
  10. }
  11.  
  12. class Icelandic extends Horse {
  13. public static void main(String[] args) {
  14. Icelandic i1 = new Icelandic();
  15. Icelandic i2 = new Icelandic();
  16. Icelandic i3 = new Icelandic();
  17. }
  18. }
Success #stdin #stdout 0.03s 245632KB
stdin
Standard input is empty
stdout
longSmall is:11394033
longLarge is:4384790
----------------------
longSmall is:11394033
longLarge is:9634993
----------------------
longSmall is:11394033
longLarge is:1641745
----------------------