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 Test{
  9.  
  10. public int Id;
  11. }
  12. class Ideone
  13. {
  14. public static int increament(Test obj){
  15. return ++obj.Id;
  16. }
  17. public static void main (String[] args) throws java.lang.Exception
  18. {
  19. // your code goes here
  20. Test ob1 = new Test();
  21. System.out.println(increament(ob1));
  22. System.out.println(ob1);
  23.  
  24. }
  25. }
  26.  
Success #stdin #stdout 0.11s 54688KB
stdin
Standard input is empty
stdout
1
Test@5caf905d