I have a method that gets the value based on a code. I am using switch case for this purpose. My code is here:
String getFruit(char code) { switch