Find the occurrence of a given character in the string.
public class Test {
public static void main(String[] args) {
String str = "Ironman Spiderman Thor BlackWidow Captain-America";
char c = 'a';
System.out.println( "The occurrence of a " + c + " in string : " + count(str, c...
learnjava.com1 min read