I am trying to read the latest 10 files based on their creation date .
I tried with this code , but it isn\'t working , i mean , it doesn\'t show the new file nam
Try flipping the comparison order:
return new Long(((File)o2).lastModified()).compareTo(new Long(((File) o1).lastModified()));
This works for me testing locally just now.