String tmp, carType = "";
tmp = JOptionPane.showInputDialog("Please input car type (CB/T) : ");
if (tmp == "C")
{carType = "Car";
System.out.print("AAAAAAAAAA");}
else if (tmp == "T")
{carType = "Truck";}
else if (tmp == "B")
{carType = "Bus";}
點解輸入"C"個陣,無出"AAAAAAAAAA",
2個既資料形態唔係都係String 咩?
點攪?