我正在为一个包含switch语句的Java方法编写一些测试,但似乎"default语句“不起作用。我只接受:是的,不,也许。也许其他的一切都应该回归。我的测试总是返回用户输入,不管用户输入什么,所以我猜我的switch语句是不正确的。default statement on the top
public String choice(String ans) { switch
我有一个constants类,其中保存了常量的HashMaps,如下所示:import java.util.Map;
* Constantesthrow new AssertionError();}userType = sc.nextInt();public static final int AUTO