I am writing a toString method where a it returns three integers. If any of them are less than ten I have to add a zero before the number. For example if I had the variables 5, 6, and 2 it would read 05:06:02. I really can't figure out how to implement this and I any help would be greatly appreciated.
Here is my current method
public String toString() {
return "The current time is " + hour + ":" + minute + ":" + second;
}