title: Same set of Code Working in Eclipse IDE and not working in Command Line
body: <p>The same code working in IDE, but not in Cmd Line. Here is my code. I cannot find what the error is?</p>
  
  <pre><code>import java.util.*;
  import java.lang.*;
  
  public class AppendingBuffer{
      public static void main(String[] args){
          StringBuilder sb;
          sb = new StringBuilder("abc");
          sb.append("def").reverse().insert(3, "---");
          System.out.println(sb);
      }
  }
  </code></pre>
  
  <p>The two screen shots are here which shows the both IDE and Cmd line programs.</p>
  
  <p><strong><em>Error In Command Line:</em></strong></p>
  
  <pre><code>E:\java\6&gt;javac AppendingBuffer.java
  AppendingBuffer.java:7: error: constructor StringBuilder in class StringBuilder
  cannot be applied to given types;
                  sb = new StringBuilder("abc");
                       ^
    required: no arguments
    found: String
    reason: actual and formal argument lists differ in length
  AppendingBuffer.java:8: error: cannot find symbol
                  sb.append("def").reverse().insert(3, "---");
                    ^
    symbol:   method append(String)
    location: variable sb of type StringBuilder
  .\StringBuilder.java:5: error: constructor StringBuilder in class StringBuilder
  cannot be applied to given types;
                  StringBuilder sb = new StringBuilder("abc");
                                     ^
    required: no arguments
    found: String
    reason: actual and formal argument lists differ in length
  .\StringBuilder.java:6: error: cannot find symbol
                  sb.append("def").reverse().insert(3, "---");
                    ^
    symbol:   method append(String)
    location: variable sb of type StringBuilder
  4 errors
  
  E:\java\6&gt;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/tjTIx.png" alt="Java Command Line">
  <img src="https://i.stack.imgur.com/QzDwY.png" alt="Java IDE"></p>