Answers for "count " " in string java"

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"

Java Answers by Framework

Browse Popular Code Answers by Language