Hello all,
I need help comprehending a fall-thru switch and how to catch the odd numbers using the option in the switch.
Here is my code:
public class HolstienSFallThruSwitch
{
public static void main(String[] args)
{
for(int i=20; i<=40; i+=2)
{
switch (i)
{
}
System.out.println(i);
}
}
}
It prints only the even numbers incrementing by 2, starting with the number 20. How would one "catch" the odd numbers in the switch? Thank you!