Description: Write a Java program called WeekDayConverter that reads an integer value between 1 and 7 from
the command line and prints out the corresponding day of the week. You may use either if…else
statements or a switch statement. The following line of code will convert the String value read from
the command line to an integer:
int weekDay = Integer.parseInt(args[0])
Therefore, calling the program as follows:
java WeekDayConverter 4
will output:
The 4th day of the week is Thursday.
To Search:
File list (Check if you may need any files):
WeekDayConverter.class
WeekDayConverter.java