title: Java's Scanner vs String.split() vs StringTokenizer; which should I use?
body: <p>I am currently using <code>split()</code> to scan through a file where each line has number of strings delimited by <code>'~'</code>. I read somewhere that <code>Scanner</code> could do a better job with a long file, performance-wise, so I thought about checking it out. </p>
  
  <p>My question is: Would I have to create two instances of <code>Scanner</code>? That is, one to read a line and another one based on the line to get tokens for a delimiter? If I have to do so, I doubt if I would get any advantage from using it. Maybe I am missing something here?</p>