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

 

konstans@stuy.edu set1 > hexify
prev  |  next  |  chance

This function takes a single number with meaningful returned values from 0 up to 15. When the input is 0-9 return the string of that number. When the input is 10 return "A", 11 is "B", 12 is "C", ... 15 is "F" Hint: To convert a number to a String, you cannot typecast! ""+5 results in "5" For all other numbers return "Err"


hexify(21) → "Err"
hexify(0) → "0"
hexify(1) → "1"

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

public String hexify(int d){ }

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

Copyright Nick Parlante 2017 - privacy