Answers for "java count how many letters have a string"

1

java string count

String line = "Your string here";
String stringToCount = "?";
int count = line.length() - line.replace(stringToCount, "").length();
Posted by: Guest on September-03-2021

Code answers related to "java count how many letters have a string"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language