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

 

jebbert@volusia.k12.fl.us > test2022_10_06_P1SLHL_fruits
prev  |  next  |  chance

Write a method that returns a string telling which kinds of fruit you have. The order matters. Also, if you have none of the listed fruits, you must return the string "You have: nothing". Look at the test data for examples. NOTE: There is only one space between each word in the resulting string.


test2022_10_06_P1SLHL_fruits(false, false, false, false) → "You have: nothing."
test2022_10_06_P1SLHL_fruits(false, true, false, true) → "You have: Oranges Bananas."
test2022_10_06_P1SLHL_fruits(true, true, false, false) → "You have: Apples Oranges."

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

public String test2022_10_06_P1SLHL_fruits(boolean apples, boolean oranges, boolean grapes, boolean bananas) { }

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: 230

Copyright Nick Parlante 2017 - privacy