Search This Blog

Showing posts with label Java 17. Show all posts
Showing posts with label Java 17. Show all posts

Friday, February 6, 2026

Java Control Structures - switch Part 1

 Why will you use yield in a switch - case in Java?

a) It is a replacement for the default

b) It can handle multiple case statements

c) It is the only statement that can be used in the default

d) To execute multiple lines of code block in a switch and return a value


Created by Nancy K.A.N

@15:44 06-Feb-2026

Saturday, October 25, 2025

PRNG - Java

 Which of the following methods is not found in the Pseudo Random Number Generator (PRNG) API?

a) NextInt()

b) NextLong()

c) random()

d) NextDouble()


Created by Nancy K.A.N.

@13:03 25-Oct-2025