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

Java > Array-1 > has23
prev  |  next  |  chance

Given an int array length 2, return true if it contains a 2 or a 3.

has23({2, 5}) → true
has23({4, 3}) → true
has23({4, 5}) → false

...Save, Compile, Run

See also Java Example Code. Java help docs: If Boolean Logic | Strings | While and For Loops | Arrays and Loops


prev  |  next  |  chance   |  CodingBat  >  Array-1

Forget It! -- delete my code for this problem 136.0

Copyright Nick Parlante 2006-10 - privacy