Author Options:

Why make the variable declarations for all the weather report words? Answered

Is there a reason to make the declarations for the weather report words? For example, String rain = String("Rain");

Why not just use the weather report words directly in the If statement? For example, if (forecast.equalsIgnoreCase("Rain") || forecast.equalsIgnoreCase("Light Rain") || forecast.equalsIgnoreCase("Rain Shower") || forecast.equalsIgnoreCase("AM Showers")){

1 Replies

bekathwiaBest Answer (author)2017-06-15

Just so I could keep track of them more easily while experimenting with different display patterns, that's all! What you wrote is equivalent.

Select as Best AnswerUndo Best Answer