這個(gè)哪里錯(cuò)了啊
public class HelloWorld {
? ? public static void main(String[] args) {
? ? ?String today="周末";
? ? ?String weather="晴朗";
? ? ?if (today.equals("周末")){
? ? ? ? ?
? ? ? ? ?if(weather.equals("晴朗")){
? ? ? ? ? ? System.out.println("去室內(nèi)游樂(lè)場(chǎng)");
? ? ? ? ?}else{
? ? ? ? ? ? System.out.println("去室外游樂(lè)場(chǎng)");
? ? ? ? ?}
? ? ? ? ?}else{?
? ? ? ? ? ? ?System.out.println("去上班");
? ? ? ? ? ? ?}
? ? ? ? ?}
? ? ?}
? ? ?
? ? ? ??
2018-03-24
謝謝樓主 看到樓主的作業(yè)我對(duì)if套if? 和equals()的用法有了更深的理解!~
2017-11-22
我知道了啊 ?各位不用回答啦,