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

 

getLetter


Return 1 for 'a' , 2 for 'b', 3 for 'c', 4 for 'd' and 5 for any other letter.


getLetter("a") → 1
getLetter("b") → 2
getLetter("c") → 3

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

public int getLetter( char myChar ) { }

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