How to print the characters from StringBuilder 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");

	    for (int i = 0; i < builder.length(); i++) {
	        System.out.println(builder.charAt(i));
	    }
    }
}


/*

run:
                   
j
a
v
a
 
c
 
c
+
+
 
p
y
t
h
o
n

 */

 



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

Related questions

1 answer 173 views
1 answer 111 views
1 answer 233 views
1 answer 141 views
1 answer 177 views
1 answer 151 views
...