Q. What is the valid data type for variable "a" to print "Hello World"?
Code:switch(a)
{
System.out.println("Hello World");
}
β
Correct Answer: (D)
byte and char
switch(a)
{
System.out.println("Hello World");
}
You must be Logged in to update hint/solution