Practice · 2 of 4
Between two bounds
CHALLENGE
Difficulty: beginner+25 XP
Implement boolean inRange(int x, int lo, int hi): true when lo <= x AND x <= hi. Java has no lo <= x <= hi chain — you must combine two comparisons with &&.
Press Submit to check your solution.
Back to lesson: Practice: Evaluate everything