Example usage for java.lang StringBuilder toString

List of usage examples for java.lang StringBuilder toString

Introduction

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

Prototype

@Override
    @HotSpotIntrinsicCandidate
    public String toString() 

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);/* ww w  .  ja v  a2  s.c  o  m*/
    System.out.println(sb.toString());
}

From source file:Main.java

public static void main(String[] argv) {
    StringBuilder sb = new StringBuilder();
    sb.append(true);/*from   w  w  w  .jav  a2  s.  c  o  m*/
    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[] args) {
    StringBuilder lipsum = new StringBuilder("Lorem ipsum dolor sit amet.");
    System.out.println("lipsum = " + lipsum.toString());

    lipsum.delete(0, 28);// w ww. j  a v  a 2 s .  com
    System.out.println("lipsum = " + lipsum.toString());

    lipsum.deleteCharAt(lipsum.length() - 1);
    System.out.println("lipsum = " + lipsum.toString());
}

From source file:Main.java

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

    sb.reverse();//  w  w w  .j  a  v  a2 s.c o m
    System.out.println(sb.toString());
}

From source file:fitmon.WorkoutApi.java

public static void main(String[] args)
        throws IOException, ClientProtocolException, NoSuchAlgorithmException, InvalidKeyException { //ClientProtocolException, IOException, NoSuchAlgorithmException, InvalidKeyException {
    WorkoutApi wa = new WorkoutApi();
    //String s;//from   ww w  .j  ava 2 s  . c o  m
    StringBuilder s = wa.apiGetInfo();
    System.out.println(s.toString());
}

From source file:Main.java

public static void main(String args[]) {
    StringBuilder buffer = new StringBuilder();

    float floatValue = 2.5f;
    buffer.insert(0, floatValue);//  www .jav a 2  s  .com

    System.out.println(buffer.toString());

}

From source file:Main.java

public static void main(String args[]) {
    StringBuilder buffer = new StringBuilder();

    long longValue = 10000000;
    buffer.insert(0, longValue);/*  www  .  jav  a  2s .  co  m*/

    System.out.println(buffer.toString());

}

From source file:Main.java

public static void main(String args[]) {
    StringBuilder buffer = new StringBuilder();

    String string = "java2s.com";
    buffer.insert(0, string);//from   ww  w . ja v a2  s .c om

    System.out.println(buffer.toString());

}