我的代碼哪兒錯了呢?
public?class?HelloWorld?{ ????public?static?void?main(String[]?args)?{ ??int?score?=?94; ??String?rst; ??String?sex?=?"女"; ????????if?(score>80) ????????{if?(sex.equals("女"))?rst="進入女子組決賽"; ????????else?if?(sex.equals("男"))?rst="進入男子組決賽"; ????????} ????????else?rst="未進入決賽"; ????????System.out.println(rst); ?} }
2018-10-05
嗯嗯。
2018-09-29
我明白了,不能用else if, 得用else