In: Computer Science
A. |
&& |
|
B. |
!= |
|
C. |
II |
|
D. |
! |
The ___________________ operator takes two boolean expressions as operands; if both are true, then the result is true; otherwise the result is false.
A. |
$$ |
|
B. |
&& |
|
C. |
|| |
|
D. |
! |
A. |
Equality operators, relational operators, logical OR, logical NOT, and logical AND. |
|
B. |
Logical OR, Logical NOT, relation operators, equality operators, logical AND. |
|
C. |
Relational operators, logical AND, equality operators, logical NOT, logical OR. |
|
D. |
Logical NOT, relation operators, equality operators, logical AND, logical OR. |
A. |
switch |
|
B. |
nested if |
|
C. |
if |
|
D. |
if else |
A. |
if |
|
B. |
?: |
|
C. |
else |
|
D. |
II |
A. |
RoundingMode |
|
B. |
BigInteger |
|
C. |
BigDecimal |
|
D. |
MathContext |
A. |
nested if |
|
B. |
if/else |
|
C. |
if |
|
D. |
switch |
A. |
case |
|
B. |
if |
|
C. |
switch |
|
D. |
if/else |
A. |
sentinel testing |
|
B. |
control testing |
|
C. |
nesting |
|
D. |
looping |
A. |
for |
|
B. |
while |
|
C. |
do while |
|
D. |
if/else |
A. |
the body of the while loop is executed. |
|
B. |
the last item is evalauted. |
|
C. |
the first item is evaluated. |
|
D. |
the program immediately terminates. |
A. |
the type of loop to be executed. |
|
B. |
the number of total items to be processed. |
|
C. |
the end of items to be processed. |
|
D. |
the beginning of items to be procesed. |
A. |
both for loop and while loop. |
|
B. |
while |
|
C. |
for |
|
D. |
do/while |
A. |
while |
|
B. |
do/while |
|
C. |
for |
|
D. |
both do/while and for |
A. |
the loop body is executed. |
||
B. |
the initialization statement is executed. |
||
C. |
the loop condition is evalauted. |
||
D. |
the loop update statement is executed. |
1.The logical operator ------------ takes one operand and inverts its value changing true to false and false to true
Answer : ! (not operator )performs one operand and inverts its value changinig true to false and false to true
2.The -------------- operator takes two boolean expression as operands if both are true ,then the results is true;otherwise the result is false
Answer: && operator performs two expressions are true than output is true otherwise false
3. What is the order of precedence of the operators that java uses to evalute a condition and selection statements to choose which instructions to executes based on whether a condition evalutes true or false?
Answer: LOgical operator, relational operator, equality operator, logical AND , logical OR
4. The ----------- statements evalutes an integer or character expression or string , then compares the expression's value to case constants.
Answer: Switch Statement evalutes int, char,string expressions are evalute
5. The ------------- operator is used in expression where one or two values should be used depending on the evalution of a condition
Answer: ?: (conditional operator) is evalutes one or two values be evalution of a condition
6.When we need to exact precision in calculations with decimal numbers, we can use the -------------- class in the java class library
Answer: BigDecimal
7. The ------------- statement is used to perform certain set of operations for one set of data and do nothhing for all other data
Answer: if statement is used to perform if condition is true and set of operations perform than nothing about all other data
8. The ----------statement is used to perform certain set of operations for one set of data for all other data
Answer: else-if statement is perform set of operations for all other data
9.------------ repeats a set of operations for each input item while a condition is true
Answer : looping is repeats opetations until condition is true
10. The ----------- loop is especially useful for event- controlled looping
Answer: do-while loop is a event-controlled loop
11. if the loop condition evalutes to false------------
Answer: the loop is immediately terminates
12. A sentinel value in the loop signals ----------
Answer: the type of loop is executed
13. The -------------- loop checks the loop condition after executing the loop body
Answer: both for and while loop
14. The -------------- loop is useful for count -controlled loops that is loops for which the number of iterations is known when the loop begins
Answer: both while and for
15. When the for loop is encounted ,what happens first ?
Answer: the initialization statement is executed first
please upvote rating my answer and my answers are correct please rating my answer