pulling text from file with Java [closed]

While what you are saying should consider other aspects as well like what if the file is very big and hence simply storing into any collection just to acces it by number wont be a good solution.
There are various APIs which can help you to solve this problem like RandomAccessFile.
Check these links will be helpful

Reading a specific line from a text file in Java

http://bitsofinfo.wordpress.com/2009/04/15/how-to-read-a-specific-line-from-a-very-large-file-in-java/

How to read a specific line using the specific line number from a file in Java?

Leave a Comment