id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

andersoniii.edwin@cusd80.com > convertToMilitaryPM
prev  |  next  |  chance

Write the method convertToMilitaryPM that receives a string as input and returns a string to military time. The given time will always be given after noon. Reminder: 12:00 AM will be assigned 0 hours.


convertToMilitaryPM("1:23") → "1323 hours"
convertToMilitaryPM("4:45") → "1645 hours"
convertToMilitaryPM("10:04") → "2204 hours"

...Save, Compile, Run (ctrl-enter)

public String convertToMilitaryPM(String thetime) }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 100

Copyright Nick Parlante 2017 - privacy