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

 

fruitType


A fruit stand sells limes, lemons, bananas and apples. The method fruitType() takes two boolean parameters, citrus and yellow and returns the type of fruit it is. For example, if citrus and yellow are both true, the fruit type would be lemon.


fruitType(true, true) → "lemon"
fruitType(true, false) → "lime"
fruitType(false, true) → "banana"

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

public String fruitType(boolean citrus, boolean yellow){ }

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