Consider that I have a txt file containing data of the following format:
"Home" "A1"
"Car" "A2"
"Home" "B1"
"Home" "A1"
"Car" "A2"
"Man" "B1"
How I can store this kind of data and also in sorted format, without duplicate data? But The first and third element must not be deleted as they are different with 2nd parameter (repetition of second parameter is allowed but not both 1st and 2nd).
Please suggest any better collection from Java suitable. Also please give an example as I am new to Java.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…