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.  
  9. class A {
  10. }
  11. class B extends A {
  12.  
  13. }
  14.  
  15. class Ideone
  16. {
  17. static int j =20;
  18. public static void main (String[] args) throws java.lang.Exception
  19. {
  20. int i =10;
  21. Ideone id = new Ideone();
  22. id.met(i);
  23. System.out.println(i);
  24. System.out.println(j);
  25. }
  26. public void met(int x){
  27. x = x*2;
  28. j = j*2;
  29. }
  30. }
Success #stdin #stdout 0.05s 320576KB
stdin
Standard input is empty
stdout
10
40