Return time without seconds

Report a typo

Write a program that reads a point in time and outputs the same time without seconds.

Note: the input time may not contain seconds.

Sample Input 1:

18:10:55

Sample Output 1:

18:10

Sample Input 2:

19:30:30

Sample Output 2:

19:30
Write a program in Java 17
class Main {
public static void main(String[] args) {
// put your code here
}
}
___

Create a free account to access the full topic