0 votes
10 views

How will you get next tuesday using java8 in Java8?

in Education by (49.4k points)

1 Answer

0 votes

How will you get next tuesday using java8 in Java8?

Following code gets next tuesday using java8 -

//get the next tuesday

LocalDate today = LocalDate.now();

LocalDate nextTuesday = today.with(TemporalAdjusters.next(DayOfWeek.TUESDAY));

System.out.println("Next Tuesday on : " + nextTuesday);

by (49.4k points)

Related questions

0 votes
1 answer 12 views
0 votes
1 answer 16 views
0 votes
1 answer 21 views
0 votes
1 answer 12 views
0 votes
1 answer 12 views
0 votes
1 answer 10 views
0 votes
1 answer 7 views
0 votes
1 answer 13 views
...