title: How to skip certain line from Text file in java?
body: <p>I am currently learning Java and I have faced this problem where I want to load a file that consists a huge number of lines (I am reading the file line by line ) and the thing I want to do is skip certain lines (pseudo-code).</p>
  
  <pre><code>the line thats starts with (specific word such as "ABC")
  </code></pre>
  
  <p>I have tried to use </p>
  
  <pre><code>if(line.startwith("abc"))
  </code></pre>
  
  <p>But that didn't work. I am not sure if I am doing it wrong, that's why I am here asking for a help, below part of the load function:</p>
  
  <pre><code>public String loadfile(.........){
  
  //here goes the variables 
  
  try {
  
          File data= new File(dataFile);
          if (data.exists()) {
              br = new BufferedReader(new FileReader(dataFile));
              while ((thisLine = br.readLine()) != null) {                        
                  if (thisLine.length() &gt; 0) {
                      tmpLine = thisLine.toString();
                      tmpLine2 = tmpLine.split(......);
                      [...]
  </code></pre>