I'm trying to add 2 weeks to date in java.
I currently use following code, it gives me today's date correctly but it gives me an error in 2 weeks date. I have attached a screenshot of the error. Any ideas on fixing this.
void Days() {
String today = LocalDate.now().toString();
System.out.println(today);
lbl_borrowdate.setText(today);
//add 2 week to the current date
LocalDate next2Week = today.plus(2, ChronoUnit.WEEKS);
System.out.println(next2Week);
lbl_duedate.setText(next2Week);
}