The most banal question, but I can not find an answer to it. Enter the numbers that will be hours, minutes and seconds, how to display the result in one line in this form: 23:20:40 That is, using the colon character.
System.out.print("Введите значение H "); while ((h = scan.nextInt()) < 0 || h > 23) { System.out.println("Нужно ввести значение от 0 до 23 ");