fork download
  1. class TestDemo
  2.  
  3. {
  4. public static void main(String[] args)
  5. {
  6. TestDemo testObj = new TestDemo();
  7. testObj.start();
  8. }
  9. void start()
  10. {
  11. long[] a1 = { 3, 4, 5 };
  12. long[] a2 = fix(a1);
  13. System.out.print(a1[0] + a1[1] + a1[2] + " ");
  14. System.out.println(a2[0] + a2[1] + a2[2]);
  15. }
  16. long[] fix(long[] a3)
  17. {
  18. a3[1] = 7;
  19. return a3;
  20. }
  21. }
  22.  
Success #stdin #stdout 0.04s 711168KB
stdin
Standard input is empty
stdout
15 15