This discussion is archived
2 Replies Latest reply: Aug 21, 2013 8:02 PM by rp0428 RSS

How to set a custom class to print i.e., System.out.println(Point); prints Point: (x,y);

KonradZuse Explorer
Currently Being Moderated

Hello all,

 


Sorry if my subject didn't make much sense, but I have a custom class object created and I want to print it a certain way like I mentioned for a Point... I am using a 3D Vector so I would want to Print out X, Y and Z which I have defined, just by doing System.out.println(Vector);

 


Thank,

 


~KZ

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points