Write a method that finds the number of occurrences of a specified character in a string using the following header

LANGUAGE:  JAVA

CHALLENGE:

(Occurrences of a specified character )
Write a method that finds the number of occurrences of a specified character in a string using the following header:
public static int count(String str, char a)
Add a main method to the class that tests the method by prompting for a string and a character,
invoking the method and printing the returned count.

SOLUTION:

The Bad News: The content you are trying to access is only available to members.

The Good News: You too can be a member, simply Click Here.

Already a member?

Posted in ,