X322: dayOfWeek

Given a day number (1-7), return the day of the week ("Sunday", "Monday", etc.). If an invalid day number is provided, return "Invalid".

Examples:

dayOfWeek(1) -> "Sunday"
dayOfWeek(4) -> "Wednesday"

Your Answer:

Reset

Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.