title: Read input from text file in java
body: <p>I want to read input from a text file in java. I have a text file as follows.</p>
  
  <pre><code>5
  4
  abcd
  6
  8
  defgh
  10
  </code></pre>
  
  <p>I want to read each character from file as a separate entity and work on that character individually like storing 4 in database separating abcd as a b c d  and work on them individually.</p>
  
  <p>What are the various ways to do it. What is the most efficient way.</p>