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

 

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

Write the method: addLeadingZero(int nums). Given any integer parameter - nums - passed into addZero method, the method will "return" a String containing a leading zero and the input number (nums). If the value of nums is zero then return two zeros.


addLeadingZero(1) → "01"
addLeadingZero(0) → "00"
addLeadingZero(12) → "012"

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

public String addLeadingZero(int nums){ }

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 Post-solution available

Copyright Nick Parlante 2017 - privacy