fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main(String[] args)
  11. {
  12. int i = 1;
  13. double x = 3.4;
  14. String s = "hi!";
  15.  
  16. System.out.println(i + " " + x + " " + s);
  17. changeUs(i, x, s);
  18. System.out.println(i + " " + x + " " + s);
  19. }
  20.  
  21. private static void changeUs(int j, double y, String t)
  22. {
  23. j = 7;
  24. y = -1.2;
  25. t = "there";
  26. System.out.println(j + " " + y + " " + t);
  27. }
  28. }
Success #stdin #stdout 0.05s 4386816KB
stdin
Standard input is empty
stdout
1 3.4 hi!
7 -1.2 there
1 3.4 hi!