I have a java program which will check for start date and end date of each item. Each Item must have their own specific start date and end date range. And this system will promp
You can do something like this:
public class DateDemo {
public static void main(String[] args) {
Date date = new Date(11, 5, 21);
Date date2 = new Date(15, 1, 21);
// tests if date2 is before date and prints result
boolean before = date2.before(date);
if (before) {
System.out.println("Date 2 is before date: " + before);
throw new RuntimeException("Error with dates");
}
}
}
Of course, it is just an example, since I don't know where this date is coming from. And you will have to do it inside a loop to verify all of them.