الرجوع
تسجيل الدخول

What is the output of the following code snippet, and is it following good coding practices?

public class WeatherReporter {
    public static void main(String[] args) {
        int temperature = 25;

        if (temperature > 30)
            System.out.println("It's a hot day.");
            System.out.println("Drink plenty of water.");
        else
            System.out.println("Enjoy your day.");
    }
}