Podcast
Questions and Answers
Which loop in Java is used to iterate a block of code a specific number of times?
Which loop in Java is used to iterate a block of code a specific number of times?
- for loop (correct)
- if-else loop
- do-while loop
- while loop
Which loop in Java is guaranteed to execute at least once?
Which loop in Java is guaranteed to execute at least once?
- for loop
- do-while loop (correct)
- while loop
- if-else loop
Which method in Java is used to find the maximum of two numbers?
Which method in Java is used to find the maximum of two numbers?
- Math.max() (correct)
- Math.abs()
- Math.ceil()
- Math.min()