What is wrong with the following switch statement? // This code has errors!!! switch (temp) { case

Question:

What is wrong with the following switch statement? 

// This code has errors!!!
switch (temp)
{
 case temp < 0 :
 System.out.println("Temp is negative.");
 break;
 case temp = 0:
 System.out.println("Temp is zero.");
 break;
 case temp > 0 :
 System.out.println("Temp is positive.");
 break;
}

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: