posted 21 years ago
Hi,
The following method will compile and run without any problems.
True/False?
public void switchTest(byte x)
{
switch(x)
{
case 'b': // 1
default : // 2
case -2: // 3
case 80: // 4
}
}
The above code compiles and runs fine in JDK1.3 but does not compile on JDK1.2 I understand the exam is based on JDK1.2 so should we answer True or False for such questions?
Thanks
Amol