What do you want to do with it? Java classes usually have sub-fields and sub-methods to structure it, similar to how you can do
new Object().toString()
and it'll print the string representation of an object.
For example, if you wanted a video-game-like vector class, you'd do
public class Vec3 {
public double x, y, z; // three doubles for the three coordinates
public Vec3(double x, double y, double z) { // constructor so you can actually make the Vec3 instance
this.x = x;
this.y = y;
this.z = z;
}
// other stuff goes here
}
So if you wanted to create a vector for a point at (3,4,5), you would do
Vec3 point = new Vec3(3, 4, 5);
You can also override methods from superclasses (all Java classes extend Object if not explicitly specified), which is most commonly used to override toString(). For example:
public class Vec3 {
public double x, y, z; // three doubles for the three coordinates
public Vec3(double x, double y, double z) { // constructor so you can actually make the Vec3 instance
this.x = x;
this.y = y;
this.z = z;
}
public String toString() {
return "[" + x + "," + y + "," + z + "]";
}
and that'll produce a string like "[3,4,5]" (given the example above with (3,4,5)).
Hope this helps!