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

 

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

Write a method that accepts three boolean input parameters; a, b, and c. Return 'true' if exactly one of these parameters is true. Otherwise return false. Remember that all the normal rules apply. For example, each method can only have one return statement.


test2024_09_19_APP1SLHL_thereCanBeOnlyOne(false, false, false) → false
test2024_09_19_APP1SLHL_thereCanBeOnlyOne(false, false, true) → true
test2024_09_19_APP1SLHL_thereCanBeOnlyOne(false, true, false) → true

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

public boolean test2024_09_19_APP1SLHL_thereCanBeOnlyOne(boolean a, boolean b, boolean c) { }

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

Copyright Nick Parlante 2017 - privacy