title: Unable to read MySQL log file
body: <p>Hey I am trying to read any "root" string in the log file name "SHIKHAR.log" but the compiler keeps on showing.</p>
  
  <pre><code>dam.java:12: error: cannot find symbol
         System.out.println("I found in file " +SHIKHAR.getName());
                                                ^
    symbol:   variable SHIKHAR
    location: class dam
  1 error
  </code></pre>
  
  <p>I am not sure what's wrong with it I have tried appending the extensions and try it otherwise aswell but it doesn't work.</p>
  
  <pre><code>import java.util.Scanner;
  import java.io.*;
  class dam 
  {
  public static void main (String arg[])
  {
  final Scanner scanner = new Scanner("SHIKHAR");
  while (scanner.hasNextLine()) {
     final String lineFromFile = scanner.nextLine();
     if(lineFromFile.contains("root")) { 
         // a match!
         System.out.println("I found in file " +SHIKHAR.getName());
         break;
     }
  }
  }
  }
  </code></pre>