Question Index

Write a program to print the season (Spring, Summer, Monsoon, Winter) depending upon the month number using switch condition.
Note: If the month is 1 to 3 it is Spring season, if the month is 4 to 6 it is Summer, if the month is 7 to 9 it is Monsoon season, if the month is 10 to 12 it is Winter season.
Use System.out.println or System.out.print for printing.

Input (Integer) Printed Output
2 Spring
4 Summer
9 Monsoon
11 Winter

class PrintSeason
    public static void main(String s[])


    public static void printSeason(int monthNumber)




Topic: Using Break In for Loop To Exit

Read this topic
Take test on this topic

Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App