How to delete substring from StringBuilder from index to index in Java

1 Answer

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

        sb.delete(1, 3);  
        
        System.out.println(sb);
    }
}



/*
run:

Ja

*/

 



answered Jun 16, 2019 by avibootz

Related questions

1 answer 166 views
1 answer 155 views
1 answer 154 views
1 answer 147 views
...