Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Objects;
- import java.util.Scanner;
- public class WeatherForecast {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- String weather = scanner.nextLine();
- if (Objects.equals(weather, "sunny")) {
- System.out.println("It's warm outside!");
- } else {
- System.out.println("It's cold outside!");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement