Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

replace character in string java

String str = ".............................."; 

        int index = 5; 
  
        char ch = '|'; 
 
        StringBuilder string = new StringBuilder(str); 
        string.setCharAt(index, ch); 

        System.out.println(string); 
 
PREVIOUS NEXT
Tagged: #replace #character #string #java
ADD COMMENT
Topic
Name
6+3 =