What is the date on Monday in Current week in Java?
Problem Description :
Concept :
The solution of this problem is very simple. We just need to use DAY_OF_WEEK constant and set() method of Calendar class that is present in java.util.* package.
Recommended :
Java Program :
Output :
Similar Problems :
1) What is the date on Sunday in Current week?
- Replace line 25 with calendar.set(Calendar.DAY_OF_WEEK, 1);
2) What is the date on Tuesday in Current week?
- Replace line 25 with calendar.set(Calendar.DAY_OF_WEEK, 3);
3) What is the date on Wednesday in Current week?
- Replace line 25 with calendar.set(Calendar.DAY_OF_WEEK, 4);
4) What is the date on Thursday in Current week?
- Replace line 25 with calendar.set(Calendar.DAY_OF_WEEK, 5);
5) What is the date on Friday in Current week?
- Replace line 25 with calendar.set(Calendar.DAY_OF_WEEK, 6);
6) What is the date on Saturday in Current week?
- Replace line 25 with calendar.set(Calendar.DAY_OF_WEEK, 7);
References :
https://docs.oracle.com/javase/7/docs/api/java/util/Date.html
Thank you friends, I hope you have clearly understood the solution of this problem. If you have any doubt, suggestion or query please feel free to comment below. You can also discuss this solution in our forum.
Tags : Date and Time problems, Date on week day in Java, Solution in Java, Calendar, DateFormat, SimpleDateFormat.
Thank you friends, I hope you have clearly understood the solution of this problem. If you have any doubt, suggestion or query please feel free to comment below. You can also discuss this solution in our forum.
Tags : Date and Time problems, Date on week day in Java, Solution in Java, Calendar, DateFormat, SimpleDateFormat.
What is the date on Monday in Current week in Java?
Reviewed by Rohit Agarwal
on
2/01/2017
Rating:
Brunei yurtdışı kargo
ReplyDeleteBrezilya yurtdışı kargo
Botswana yurtdışı kargo
Bosna Hersek yurtdışı kargo
Burundi yurtdışı kargo
2Ä°2W