Skip to content

Instantly share code, notes, and snippets.

@udacityandroid
Last active February 6, 2023 13:44
Show Gist options
  • Star 45 You must be signed in to star a gist
  • Fork 22 You must be signed in to fork a gist
  • Save udacityandroid/03774486d065d2302e33 to your computer and use it in GitHub Desktop.
Save udacityandroid/03774486d065d2302e33 to your computer and use it in GitHub Desktop.
Android for Beginners : If/Else Weather Quiz
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.");
}
@Fury4hwxc
Copy link

thanks 👍

@djalilo24
Copy link

C

@YassineOuardini
Copy link

Question C Because isRaining is false, though, it will print the Else Statement to the logs, which is "It's unlikely to rain".

@YassineOuardini
Copy link

Question C Because isRaining is false, though, it will print the Else Statement to the logs, which is "It's unlikely to rain".

@Dexaan
Copy link

Dexaan commented Jul 22, 2019

boolean isRainingInVancouver = true;

@ElikplimSunu
Copy link

Wow we've come a really long way :)

@Ali-FF
Copy link

Ali-FF commented May 29, 2020

let's do this course together mail me at izaneqwan@gmail.com

@allouane
Copy link

allouane commented Jun 4, 2020

It's unlikely to rain. because the isRaining boolean is false

@pro-coder-fast
Copy link

Thank you for using the WhetherWeather App.

@pro-coder-fast
Copy link

It's unlikely to rain.

@mixspark
Copy link

all right

@Harriskobia
Copy link

V/WeatherActivity : Thankyou for using the WhetherWeather App.
V/WeatherActivity : It's unlikely to rain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment