Example usage for java.lang StringBuilder append

List of usage examples for java.lang StringBuilder append

Introduction

In this page you can find the example usage for java.lang StringBuilder append.

Prototype

@Override
    public StringBuilder append(double d) 

Source Link

Usage

From source file:Main.java

public static void main(String[] argv) {
    StringBuilder sb = new StringBuilder();
    sb.append('a');
    System.out.println(sb.toString());
}

From source file:Main.java

public static void main(String[] argv) {
    StringBuilder sb = new StringBuilder();
    sb.append(1.2);
    System.out.println(sb.toString());
}

From source file:Main.java

public static void main(String[] argv) {
    StringBuilder sb = new StringBuilder();
    sb.append("java2s.com");
    System.out.println(sb.toString());
}

From source file:Main.java

public static void main(String[] argv) {
    StringBuilder sb = new StringBuilder();
    sb.append(true);
    System.out.println(sb.toString());
}

From source file:Main.java

public static void main(String[] argv) {
    StringBuilder sb = new StringBuilder();
    sb.append("java2s.com");
    String sub = sb.substring(1, 2);
    System.out.println(sub);//from w ww  . j av  a  2  s . c  om
}

From source file:Main.java

public static void main(String args[]) {
    StringBuilder sb = new StringBuilder();
    sb.append("java2s.com");
    int index = sb.indexOf("a");
    System.out.println(index);/*w ww  . j a  v  a  2  s  .c o m*/

}

From source file:Main.java

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

    System.out.println(new String(sb));

}

From source file:Main.java

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

    sb.reverse();// ww w.j  a va 2  s . c om
    System.out.println(sb.toString());
}

From source file:Main.java

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

    System.out.println(sb.length());

    System.out.println(sb.capacity());
}

From source file:Main.java

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

    sb.delete(1, 2);/*from   ww w .  j  a v  a2 s . c o  m*/
    System.out.println(sb.toString());
}