in java: Q1. A Boolean variable can only be assigned true or false values. (T or
ID: 3794423 • Letter: I
Question
in java:
Q1. A Boolean variable can only be assigned true or false values. (T or F)
Q2. Input validation allows you to make sure that the user-supplied values are valid before you use them in your computations. (T or F)
Q3. Evaluate the following condition:
10 > -10 && 222 <= 22
(T or F)
Q4. Match the operator with its name.
1 - and operator ..
2- not operator ..
3 - or operator ..
(! - || - &&)
Q5. You can use the ! operator to combine multiple conditions.(T or F)
Q6. Evaluate the condition:
10 < 7 || 10 <= 22 && 23 != 23
(T or F)
Q7. When using the && Boolean operator, if at least one of the conditions is true, the && operator yields true.(T or F)
Q8. When using the || operator, if at least one condition is true, the || operator yields true. (T or F)
1 - and operator ..
2- not operator ..
3 - or operator ..
(! - || - &&)
Q5. You can use the ! operator to combine multiple conditions.(T or F)
Q6. Evaluate the condition:
10 < 7 || 10 <= 22 && 23 != 23
(T or F)
Q7. When using the && Boolean operator, if at least one of the conditions is true, the && operator yields true.(T or F)
Q8. When using the || operator, if at least one condition is true, the || operator yields true. (T or F)
Explanation / Answer
1.)
Yes this statement is true, beacuse in java boolean variable takes input as only true or false.
2.)
The statement is true for java language. for example, in package java.util.scanner has many hasNext method for input validation.
hasNextInt() - does it have a token that can be parsed into an int?
3.)
true && false= false
So the answer is False
4)
&& is AND operator
! is not operator
|| is or operator.
5)
The statement is False
6)
The condition evalutaes to
Flase || False && False.
False && False
So the result will be False.
7)
This statement is false, you can refer to above evaluations.
8)
This statement is true.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.