Answer:
Answered below.
Step-by-step explanation:
class Convert {
public static String format(long seconds) {
Scanner sc = new Scanner(System.in);
System.out.print("Enter total seconds: ");
int secs = sc.nextInt();
int hours = secs / 3600;
int minutes = (secs % 3600) / 60;
int seconds = (secs % 3600) % 60;
String timeFormat = hours + ":" + minutes + ":" + seconds;
return timeFormat;
}
}