title: How to skip reading a line with scanner
body: <p>I have read in a text file and am scanning said file. The question I have is how would I skip over lines that include a certain character (in my case lines that start with " // " and "   " (whitespace).</p>
  
  <p>Here is my code at the moment. Can someone point me in the right direction?</p>
  
  <pre><code>    File dataFile = new File(filename);
      Scanner scanner = new Scanner(dataFile);
  
  
        while(scanner.hasNext())
        {
           String lineOfText = scanner.nextLine();
           if (lineOfText.startsWith("//")) {
             System.out.println(); // not sure what to put here
           }
        System.out.println(lineOfText);
        }
     scanner.close();
  </code></pre>