Check if a String is a valid date

This example checks if a String is a valid date by parsing the String with an instance
of the SimpleDateFormat class and returns true or false.

The output will be…


…since the year 2004 was a leap year.

Search for more Java info on this site here:
Custom Search

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">