fork download
  1. class test {
  2. int a;
  3. int b;
  4. test(int i, int j) {
  5. a = i;
  6. b = j;
  7. }
  8. void meth(test o) {
  9. o.a *= 2;
  10. o.b /= 2;
  11. }
  12. }
  13.  
  14. class Output{
  15. public static void main(String args[])
  16. {
  17. test obj = new test(10 , 20);
  18. obj.meth(obj);
  19. System.out.println(obj.a + " " + obj.b); }
  20. }
Success #stdin #stdout 0.15s 57572KB
stdin
Standard input is empty
stdout
20 10