Program to sort data of file in java?

i have three files among which i have stored the following information:
File1.txt contains following:

101 Harry Amritsar Punjab

Flie2.txt contains following:

102 Max Chandigarh Punjab
101 Mac Panchkula Haryana
I want to pick data from both files and save them into a third file File.txt in soorted order.
the sorting can be by Id or by Name


  • Anoop Kumar
    Anoop Kumar
    You need to create map first with ID or Name with line number and then sort this map.
    After that again read the file extract the data from that line number put in a different file.

    How to read a specific line in file. see this

You are reading an archived discussion.

Related Posts

If anyone of you are using Ubuntu 13.10 then kindly show me the screenshot of Settings -> Universal Access. Thanks. It's urgent.
The Persona Sign-In System from Mozilla was not much known and couldn’t create buzz in the tech world. You are apparently not the only one who does not know anything...
I'll be developing a Windows Phone app as a part of my project. The app will include tags for mentioning. I've planned to use HTML for development, since I've a...
The amazing properties of spider web silk are known to most of us, well, through General Knowledge textbooks and through "Fun Facts/Did You Know?" sections on the back cover pages...
Are you working on your reading speed? If yes, well you must try this app. Spritz is a latest app developed by Frank Waldman, Maik Maurer and Jamie Locke -...