Array & String - Practice Quiz
12. What is the purpose of conditional operators in Java?
- To perform arithmetic operations.
- To evaluate conditions and produce boolean results.
- To perform bitwise operations.
- To perform type casting.
14. What is the purpose of bitwise operators in Java?
- To perform arithmetic operations.
- To evaluate conditions and produce boolean results.
- To perform logical operations.
- To perform operations on individual bits of integers.
15. What is the purpose of the arithmetic operators in Java?
- To perform operations on individual bits of integers.
- To evaluate conditions and produce boolean results.
- To perform logical operations.
- To perform basic arithmetic operations such as addition, subtraction, multiplication, and division.
Core Java - Graded Quiz
16. Which of the following is a control flow statement in Java?
- int
- switch
- String
- System.out.println()
17. What is the purpose of the ternary operator in Java?
- To perform loops.
- To perform arithmetic operations.
- To evaluate conditions and produce results based on the outcome of the condition.
- To declare variables.
19. What is the purpose of the break statement in Java?
- To end the program execution.
- To skip the current iteration of a loop and move to the next iteration.
- To continue to the next iteration of a loop.
- To exit a loop or switch statement before its normal completion.
20. What is the purpose of the continue statement in Java?
- To end the program execution.
- To skip the next iteration of a loop and move to the iteration after the next.
- To exit a loop or switch statement before its normal completion.
- To skip the current iteration of a loop and move to the next iteration.