title: Reading a particular line from a text file in Java
body: <p>What is the most efficient way to extract specific line numbers of data from a text file?  For example, if I use the Scanner to parse a file, do I first have to create an array with a length matching the total number of lines in the text file?</p>
  
  <p>If a text file has 30 lines and I only want to work with lines 3, 8, and 12, is there a way to specifically only read those lines?</p>