...
OOPS
November 29, 2023
STQC-NIELIT SC-B 2021
November 29, 2023
OOPS
November 29, 2023
STQC-NIELIT SC-B 2021
November 29, 2023

KVS 30-12-2018 Part B

Question 15
Consider the following code segment in JAVA
switch(x)
{
default;
system.out.println(“Hello”);
}
Which of the following data types are acceptable for x?
A
Byte and char
B
Long and char
C
Char and float
D
Byte and float
Question 15 Explanation: 
The possible values are either integer constant or character constant.No other data type values are allowed.
Correct Answer: A
Question 15 Explanation: 
The possible values are either integer constant or character constant.No other data type values are allowed.

Leave a Reply

Your email address will not be published. Required fields are marked *