Given that your question is unclear, I expect you to try to create a random one java.util.Datewith a given range.
Please note that java.util.Datecontains information about the date and time.
Date Java EPOCH. , , d1 d2 - Date, d1 < d2 ( ):
Date randomDate = new Date(ThreadLocalRandom.nextLong(d1.getTime(), d2.getTime()));
"" ( ), , LocalDate ( Java 8+ JODA).
, , d1 d2 LocalDate, d1 < d2 ():
int days = Days.daysBetween(d1, d2).toDays();
LocalDate randomDate = d1.addDays(ThreadLocalRandom.nextInt(days+1));