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

 

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

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


convertToMilitary("1:23") → "0123 hours"
convertToMilitary("4:45") → "0445 hours"
convertToMilitary("10:04") → "1004 hours"

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

public String convertToMilitary(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