A

Admin • 833K Points
Coach

Q. What is the valid data type for variable "a" to print "Hello World"?

Code:
switch(a)
{
System.out.println("Hello World");
}
  • (A) int and float
  • (B) byte and short
  • (C) char and long
  • (D) byte and char
  • Correct Answer - Option(D)
  • Views: 23
  • Filed under category Java
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.