java n00b here.
I have a custom Data type defined like this:
public class MyData{
    int value;
    int type;
    String name;
    public MyData(int newValue, int newType, string newName)
    {
        value = newValue;
        type  = newType;
        name  = newName;
    }
}
When I call an instance of this class, I want it to evaluate to the value property, like this:
myData dataInstance = new myData(100,3,"customData");
System.out.println(dataInstance); // should print "100"
Can this be achieved?
 
    