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 179 views
1 answer 176 views
1 answer 175 views
1 answer 168 views
...