Qna 8
Qna 8
10. Which of the following is a network device that amplifies signals to extend the range
of a network?
a. Repeater b) Router c) Switch d) Firewall
Fill-in-the-Blank Questions
1. The if statement is used in Java to execute a block of code only if a specific ________
is true. Answer: condition
2. In Java, the else statement is used to provide an alternative action when the ________
condition of an if statement is false. Answer: if
3. An error that occurs when the program cannot compile due to incorrect syntax, such
as a missing parenthesis, is known as a ________. Answer: syntax error
4. The ________ statement in Java allows you to execute a block of code multiple times
based on a condition. Answer: while or for
5. A ________ error occurs in Java when the program runs but produces an unexpected
result, often caused by incorrect logic. Answer: logical