title: Compilation error "incompatible types" in a Java class named String
body: <p>Error in String....</p>
  
  <p>My error:</p>
  
  <pre><code>C:\Users\Kiran\Desktop\java\bin&gt;javac String.java  
  String.java:7: error: incompatible types  
  String text = "Hello";  
                ^  
    required: String
    found:    java.lang.String  
  String.java:9: error: incompatible types  
  String blank = " ";  
                 ^
    required: String  
    found:    java.lang.String  
  String.java:11: error: incompatible types  
  String name = "Kiran";  
                ^  
    required: String  
    found:    java.lang.String    
  String.java:13: error: bad operand types for binary operator '+'  
  String message = text + blank + name;   
                        ^
    first type:  String  
    second type: String  
  4 errors  
  </code></pre>
  
  <p>My program: </p>
  
  <pre><code>public class String {
      public static void main(String args[]) {
          int myNumber = 7;
          String text = "Hello";
          String blank = " ";
          String name = "Kiran";
          String message = text + blank + name;
          System.out.println(message);
          System.out.println("Hello Java" + " " + "Iam Kiran");
          System.out.println("my integer is : " +myNumber);
          double myDouble = 7.8;
          System.out.println("my number is: " + myDouble + "!!");
      }
  }
  </code></pre>
  
  <p>I don't know why this error coming. I wrote approximately Right. But it still keeps coming.<br>
  My java program is in Desktop.  </p>