Look here:
Java Operators[
^] - it covers the java logical operators
&&
,
||
, and
!
which provide what you need.
The word
and
in your code is wrong - you want to use the AND operator
&&
instead, and the syntax is also incorrect:
if (a >= 0 && a <= 10) {
System.out.println("a is in range");
}
Will give you a display provided
a
is between 0 and 10 inclusive.
Think about the question, and you'll get the idea!