关于java中不使用数组的soundex编码
我想用java编写soundex编码,但我不知道如何在不使用数组的情况下编写它。我想用字符串来编码它 例如,“skipper”变为“2201106” 0 a e h i o y w 1b p f v 2 c s k g j q x z 三维t 4升 5米n 6R ↑ 这些列表是soundex键 有人能帮我解决这个问题吗? 我应该用开关来解决这个问题吗关于java中不使用数组的soundex编码,java,Java,我想用java编写soundex编码,但我不知道如何在不使用数组的情况下编写它。我想用字符串来编码它 例如,“skipper”变为“2201106” 0 a e h i o y w 1b p f v 2 c s k g j q x z 三维t 4升 5米n 6R ↑ 这些列表是soundex键 有人能帮我解决这个问题吗? 我应该用开关来解决这个问题吗 public class soundexCoding{ public static void main(String[] args){ s
public class soundexCoding{
public static void main(String[] args){
soundexCheck();
}
static void String soundexCheck{
switch(){
case 'a';
return "1";
break;
}
}
}
我建议将字符映射到代码,而不是切换。