public String toMilitary()
{
return String.format("%2d:%2d:%2d", hour, minute, second);
}
This code gives the following error:
The method
format(String, Object[])in the typeStringis not applicable for the arguments(String, int, int, int)
Also, Enhanced for loop and Variable Parameters shown errors.
Is there a problem with my compiler. Should I re-install it?