Sub string from StringBuilder

CharSequence subSequence(int start, int end)
Returns a new character sequence that is a subsequence of this sequence.
String substring(int start)
Returns a new String that contains a subsequence of characters currently contained in this character sequence.
String substring(int start, int end)
Returns a new String that contains a subsequence of characters currently contained in this sequence.

public class Main {
  public static void main(String[] argv) {
    StringBuilder sb = new StringBuilder();
    sb.append("java2s.com");

    System.out.println(sb.substring(3));
  }
}

The output:


a2s.com
Home 
  Java Book 
    Essential Classes  

StringBuilder:
  1. StringBuilder
  2. StringBuilder Constructor
  3. append(char c)
  4. StringBuilder capacity()
  5. charAt()
  6. delete(int start, int end)
  7. deleteCharAt
  8. StringBuilder length()
  9. StringBuilder reverse()
  10. setCharAt
  11. Sub string from StringBuilder
  12. toString():Convert StringBuilder to String