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.  
  11. public static class Coordinate {
  12. private int x = 3;
  13. private int y = 5;
  14.  
  15. @Override
  16. public String toString(){
  17. String Strx = Integer.toString(x);
  18. String Stry = Integer.toString(y);
  19. String result = "(" + Strx + ", " + Stry + ")";
  20. return result;
  21. }
  22. }
  23. public static void main (String[] args) throws java.lang.Exception
  24. {
  25. Coordinate place = new Coordinate();
  26. System.out.println(place);
  27. }
  28. }
  29.  
  30.  
Success #stdin #stdout 0.07s 380160KB
stdin
Standard input is empty
stdout
(3, 5)