Hi everybody, Im busy doing homework at the moment, and im stuck at a point. I need to figure out how to give a length to an integer. Like for a double you can set how many decimals you want (in the output) by changing %f to %.2f
Here is the problem:
out.printf("The total time is: %d:%d:%d", timeHour, timeMinutes, timeSeconds);
the output i need has to be in the form 00:00:00 so even if theres is only 1 hour 8 minutes en 53 seconds the output gives 01:08:53
im stuck at an output as: 1:8:53
Id really appreciated some help. I hope before thursday since thats the day i have to submit the program :). Thanks! Auke