Question: What variable type of red allows the following application to compile? package tornado; public class Kansas { public static void main(String[] args) { int colorOfRainbow
What variable type of red allows the following application to compile?
![package tornado; public class Kansas { public static void main(String[] args) {](https://dsd5zvtm8ll6.cloudfront.net/images/question_images/1707/1/9/8/88065c1c9a0e5b391707198882893.jpg)
package tornado; public class Kansas { public static void main(String[] args) { int colorOfRainbow = 10; red = 5; switch(colorOfRainbow) { } } hanged } default: System.out.print("Home"); break; case red: System.out.print("Away"); A. long B. double C. int D. var E. String F. None of the above
Step by Step Solution
3.48 Rating (155 Votes )
There are 3 Steps involved in it
The switch statement in Java works with several data types including byte short int char and their c... View full answer
Get step-by-step solutions from verified subject matter experts
