Check if the user has entered the date which is 18+ years and return false if not using java?

the following java code does not validate the user to be 18+ years old and it returns true for any date chosen. how can i make it reject any date that does not amount to 18+ years old.
5 answers 5