Hello everyone, I am new to Java and need some help. the question is as follows.....

Create a modified version of this project as follows:

Allow the user to enter the hours, minutes, and seconds in one prompt instead of three separate prompts. That is, the user would be allowed to represent 1 hour 28 minutes and 42 seconds by entering:


This will require you to use the colon ( as a delimeter in the scanned input.

I have the following code which works well, but I need to adjust it to where I only have one manual entry rather than three.

import java.util.Scanner;
import java.io.*;

public class userinput {

public static void main(String[] args)
Scanner time = new Scanner(System.in);
String hour;
String min;
String sec;
String cotime;

hour = time.next();
min = time.next();
sec = time.next();

cotime = (hour + ":" + min + ":" + sec);