How to delete substring 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++");

        builder.delete(5, 6);
        System.out.println(builder);
    }
}


/*

run:
                   
java  c++
          
 */

 



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

Related questions

1 answer 169 views
1 answer 155 views
1 answer 147 views
1 answer 184 views
...