Telegram Group 🔥🔥🔥
Get answers in minutes
Questions answered :
48
/50
Answer verified
What will be the output of the program
public class Switch2
{
final static short x = 2;
public static int y = 0;
public static void main(String [] args)
{
for (int z=0; z < 3; z++)
{
switch (z)
{
case x: System.out.print("0 ");
case x-1: System.out.print("1 ");
case x-2: System.out.print("2 ");
}
}
}
}
🗓 Jul 2, 2021
votes
Gabriella
🌐 India
give solution please
votes
Victoria
🌐 India
can anyone share the explanation, please?
Was your question answered?
Thanks for the feedback! ✅
Want to get famous? 📸
Answer question and get 🤩 high-lighted on our homepage.