Get latest file based on file name pattern in java
<p>Have file name pattern as YYYYMDD or YYYYMMDD as below. </p>

<p>Have list of files with below pattern in a directory.
Have to read the latest file based on the file name in java. 
How to do this?</p>

<pre><code>xxx_2016103
....
xxx_20161104
</code></pre>