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 173 views
1 answer 162 views
1 answer 164 views
1 answer 156 views
...