I'm trying to simplify a Card class, and am wondering if there's any way to use a range of values in a switch statement?
CONSIDER:
if((card<14))
suit="Hearts";
else
if((card>14)&&(card<27))
suit="Clubs";
etc.
Instead I'd like to use a switch statement, such as:
switch(card){
case1: through case13:
suit="Hearts";
break;
etc.
I wasn't able to find anything in the Java Tutorials that suggest there is such a variation of switch. But is there?