Course Content

Java Basics

## Java Basics

# Weekday Switch Challenge

Task

Write a program that takes an integer from `1`

to `7`

and prints the corresponding day of the week. Use a `switch`

statement to solve the problem.

If the number is greater than 7 or less than 1, display an `Error`

text.

Note

You should write a case for each day of the week

from 1 to 7, starting with Monday. Replace`___`

with thecorresponding days, andalso complete the codewith cases for days 4, 5, 6, and 7 of the week.

Task

Write a program that takes an integer from `1`

to `7`

and prints the corresponding day of the week. Use a `switch`

statement to solve the problem.

If the number is greater than 7 or less than 1, display an `Error`

text.

Note

You should write a case for each day of the week

from 1 to 7, starting with Monday. Replace`___`

with thecorresponding days, andalso complete the codewith cases for days 4, 5, 6, and 7 of the week.

Everything was clear?

# Weekday Switch Challenge

Task

Write a program that takes an integer from `1`

to `7`

and prints the corresponding day of the week. Use a `switch`

statement to solve the problem.

If the number is greater than 7 or less than 1, display an `Error`

text.

Note

You should write a case for each day of the week

from 1 to 7, starting with Monday. Replace`___`

with thecorresponding days, andalso complete the codewith cases for days 4, 5, 6, and 7 of the week.

Task

`1`

to `7`

and prints the corresponding day of the week. Use a `switch`

statement to solve the problem.

If the number is greater than 7 or less than 1, display an `Error`

text.

Note

from 1 to 7, starting with Monday. Replace`___`

with thecorresponding days, andalso complete the codewith cases for days 4, 5, 6, and 7 of the week.

Everything was clear?

# Weekday Switch Challenge

Task

`1`

to `7`

and prints the corresponding day of the week. Use a `switch`

statement to solve the problem.

If the number is greater than 7 or less than 1, display an `Error`

text.

Note

from 1 to 7, starting with Monday. Replace`___`

with thecorresponding days, andalso complete the codewith cases for days 4, 5, 6, and 7 of the week.

Task

`1`

to `7`

and prints the corresponding day of the week. Use a `switch`

statement to solve the problem.

If the number is greater than 7 or less than 1, display an `Error`

text.

Note

from 1 to 7, starting with Monday. Replace`___`

with thecorresponding days, andalso complete the codewith cases for days 4, 5, 6, and 7 of the week.

Everything was clear?

Task

`1`

to `7`

and prints the corresponding day of the week. Use a `switch`

statement to solve the problem.

If the number is greater than 7 or less than 1, display an `Error`

text.

Note

from 1 to 7, starting with Monday. Replace`___`

with thecorresponding days, andalso complete the codewith cases for days 4, 5, 6, and 7 of the week.