title: Using Scanner to read file
body: <p>I am using Scanner to read the text file which contains *, spaces and alphabets. Two or more spaces can occur one after the other. Eg:</p>
  
  <pre><code>****  AAAAA* *    ****
      *******    AAAAAA*** *
  </code></pre>
  
  <p>I have written the following code:</p>
  
  <pre><code>lineTokenizer = new Scanner(s.nextLine());
  int i=0;
  if (lineTokenizer.hasNext()) {
      //lineTokenizer.useDelimiter("\\s");
      System.out.println(lineTokenizer.next());
      //maze[0][i]=lineTokenizer.next();
      i++;
  }
  </code></pre>
  
  <p>The lineTokenizer doesn't read beyond the * from the input file not are the characters getting stored in the maze array. Can you tell me where I'm going wrong? Thanks!</p>