我有一个问题尝试比较变量char程序没有压缩 ......
你会看到问题......Scanner sc = new Scanner(System.in);
double desca=0.05;
System.out.println("Categori type *A* o *B*");
char cate = sc.nextChar();
System.out.println("type total to pay a" + cate + ".");
double map = sc.nextDouble();
if(cate=='a')
map=map-(desca*map);
System.out.println("Monto a pagar es de " + map + " pesos.");