Java-How to Print names along with sorted dates?
问题 I have a file with names and DateOfbirths. I am matching the BateOfBirths with the regex and i want to store them into an array so that i can sort dates. What i have done is Text file: name1 dd-MM-yyyy name2 dd-MM-yyyy namw3 dd-MM-yyyy name4 dd-MM-yyyy my code: import java.io.*; import java.util.regex.Pattern; import java.util.regex.Matcher; import java.util.Scanner; import java.util.*; import java.text.*; class SortDate{ public static void main(String args[]) throws IOException {