How to declare, initialize and print StringBuilder in Java

1 Answer

0 votes
public class MyClass {
    public static void main(String args[]) {
        StringBuilder sb = new StringBuilder("Java");  

        System.out.println(sb);
    }
}



/*
run:

Java

*/

 



answered Jun 15, 2019 by avibootz
edited Jun 16, 2019 by avibootz
...