Question: Your task is to write a method that converts military time to ordinary time. For example, 1935 becomes 7:35 pm 935 becomes 9:35 am 1900
Your task is to write a method that converts military time to ordinary time. For example,
1935 becomes 7:35 pm
935 becomes 9:35 am
1900 becomes 7 pm
35 becomes 12:35 am
Complete the following file:
TimeConvert.java
public class TimeConvert { /** Converts military time to ordinary time. @param milTime, the military time provided: hhmm @return a string of the form 9:35 am or 7 pm */ public static String militaryToOrdinaryTime(int milTime) { ... } }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
