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

 

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

Write a method that has three boolean parameters b1, b2, and b3. Return the total number of these parameters that are 'true'. So you are counting how many of the three parameters are 'true'.


nov9_2015_APSLHL_countTrue(true, true, true) → 3
nov9_2015_APSLHL_countTrue(true, false, false) → 1
nov9_2015_APSLHL_countTrue(false, false, false) → 0

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

public int nov9_2015_APSLHL_countTrue(boolean b1, boolean b2, boolean b3) { }

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

Copyright Nick Parlante 2017 - privacy