Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to test how many of one character is in a string java

int count = string.length() - string.replaceAll("g","").length()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #test #character #string #java
ADD COMMENT
Topic
Name
9+5 =