OOPS
November 29, 2023Question 15857 – STQC-NIELIT SC-B 2021
November 29, 2023OOPS
Question 77
|
Consider the following code segment in JAVA
switch(x)
{
default;
system.out.println(“Hello”);
}
Which of the following data types are acceptable for x?
switch(x)
{
default;
system.out.println(“Hello”);
}
Which of the following data types are acceptable for x?
Byte and char
|
|
Long and char
|
|
Char and float
|
|
Byte and float
|
Question 77 Explanation:
The possible values are either integer constant or character constant.No other data type values are allowed.
Correct Answer: A
Question 77 Explanation:
The possible values are either integer constant or character constant.No other data type values are allowed.
Subscribe
Login
0 Comments