Find all mondays

Report a typo

Write a program that reads a year and the number of a month (1-12) and prints the dates of all Mondays of this month in the correct order (from the first to the last).

Sample Input 1:

2017 1

Sample Output 1:

2017-01-02
2017-01-09
2017-01-16
2017-01-23
2017-01-30
Write a program in Java 17
class Main {
public static void main(String[] args) {
// put your code here
}
}
___

Create a free account to access the full topic