How to get the StringBuilder length in Java

1 Answer

0 votes
package javaapplication1;

import java.io.IOException;

public class JavaApplication1 {

    public static void main(String[] args) throws IOException {

        StringBuilder builder = new StringBuilder("java c c++ python");

	    System.out.println(builder.length());
    }
}


/*

run:
                   
17

 */

 



answered Dec 20, 2016 by avibootz
edited Jan 10, 2017 by avibootz

Related questions

1 answer 112 views
5 answers 293 views
1 answer 120 views
1 answer 62 views
1 answer 74 views
1 answer 76 views
1 answer 84 views
...