First of all, hello Im Joey and Ive recently started messing around with the Java language. Ill do my best not to bother you alot with my newbie questions :)
So I need to create a method that returns some variables I have encapsulated, as String but without the last digit.
So :
double value1 = 23.45
double value2 = 11.47
The output should be
value 1 is 23.4
value 2 is 11.5
Ive got this far :)
public String toString(){
return ("X = " + Double.toString(value1) + " , Y = " + Double.toString(value2));
}
Any help would be great