title: Main.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details
body: <p>Main.java:3: class Holeintext is public, should be declared in a file named Holeintext.java public class Holeintext 
  { ^ 
  Note: Main.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. 1 error</p>
  
  <p>this is error i m getting this is an compilation error can someone tell me how to solve this. please help.
  while compiling on my pc it is running with out any error but the moment i upload it on site to compile it show me this error.</p>
  
  <p>the code is :</p>
  
  <pre><code>package holeintext;
  import java.io.*;
  class Holeintext {
      public static void main(String[] args) throws Exception {
          // TODO code application logic here
          DataInputStream in = new DataInputStream(System.in);
          String s;
          char[] str;
          System.out.println("INPUT:");
          int c = Integer.parseInt( in .readLine());
          String[] str1 = new String[c];
          for (int m = 0; m &lt; c; m++) {
              s = in .readLine();
              str1[m] = s; //at this point we have a array with our input
          }
          System.out.println("OUTPUT:");
          for (int g = 0; g &lt; str1.length; g++) {
              s = str1[g];
              str = s.toCharArray();
              int i = 0;
              int count = 0;
              while (i &lt; str.length) {
                  if ((str[i] == 'A') || (str[i] == 'D') || (str[i] == 'O') ||
                      (str[i] == 'P') || (str[i] == 'R')) {
                      count = count + 1;
                  } else
                  if (str[i] == 'B') {
                      count = count + 2;
                  }
                  i++;
              }
              System.out.println(count);
          }
      }
  }
  </code></pre>