-
-
Save udacityandroid/03774486d065d2302e33 to your computer and use it in GitHub Desktop.
boolean isRaining = false; | |
Log.v("WeatherActivity", "Thank you for using the WhetherWeather App."); | |
if (isRaining) { | |
Log.v("WeatherActivity", "It's raining, better bring an umbrella."); | |
} else { | |
Log.v("WeatherActivity", "It's unlikely to rain."); | |
} |
C
Please stop being so mean to others. I get that people don't always want to see the answers, but it could be said differently. Kindness goes a long way!
A question, if the control statement is changed such that,
boolean isRaining = false;
Log.v("WeatherActivity", "Thank you for using the WhetherWeather App.");
if (isRaining==false) {
Log.v("WeatherActivity", "It's raining, better bring an umbrella.");
} else {
Log.v("WeatherActivity", "It's unlikely to rain.");
}
Will the statement inside 'if' be executed or will it give some kind of error?
interesting
Okay, this is similar to the example in the video. Let me go back to answer my quiz
Let me just ran back to the video and submit my right answer LOL
thats interesting
thanks 👍
C
Question C Because isRaining is false, though, it will print the Else Statement to the logs, which is "It's unlikely to rain".
Question C Because isRaining is false, though, it will print the Else Statement to the logs, which is "It's unlikely to rain".
boolean isRainingInVancouver = true;
Wow we've come a really long way :)
let's do this course together mail me at izaneqwan@gmail.com
It's unlikely to rain. because the isRaining boolean is false
Thank you for using the WhetherWeather App.
It's unlikely to rain.
all right
V/WeatherActivity : Thankyou for using the WhetherWeather App.
V/WeatherActivity : It's unlikely to rain.
Thank you for using the WhetherWeather App.
It's unlikely to rain.