我实现了一个字体系统,通过char开关语句找出应该使用哪个字母。我的字体图像中只有大写字母。我需要让' a '和'A'都具有相同的输出。而不是有两倍的情况数量,是否可以像以下这样:
char c;
switch(c){
case 'a' & 'A': /*get the 'A' image*/; break;
case 'b' & 'B': /*get the 'B' image*/; break;
...
case 'z' & 'Z': /*get the 'Z' image*/; break;
}
在Java中是否可行?