first I'd like to apologize for the weird question, I'm quite new to Java.
So, let's say I had a piece of code like this here:
switch(test) {
case 50:
case 51:
case 52:
case 53:
case 54:
case 55:
case 56:
case 57:
case 58:
case 59:
case 60:
case 61:
case 62:
case 63:
case 64:
case 65:
case 66:
case 67:
case 68:
case 69:
case 70:
case 71:
case 72:
case 73:
case 74:
case 75:
case 76:
case 77:
case 78:
case 79:
case 80:
System.out.println("random");
}
break;
Just for example.
There's quite a lot of cases and I'm wondering if there's a way to shorten it. I tried using a for loop to iterate through this data but I couldn't quite wrap my head around it. Any help is appreciated.
Again, excuse the nooby question! I'm quite new to Java!
Thanks in advance.