kodejava-lang-package/src/main/java/org/kodejava/example/lang/CharCounter.java
private static int countCharOccurrences(String source, char target) {
        int counter = 0;

        // Loop through the string and increment the counter if the
        // target character found in the string. 
        for (int i = 0; i < source.length(); i++) {
            if (source.charAt(i) == target) {
                counter++;
            }
        }
        return counter;
    }
/**
     * Count number of specified char occurrences in the specified string.
     */
Count number of specified char occurrences in the specified string.
Count number of specified char occurrences in the specified string .
private static int countCharOccurrences(String source, char target) {
        int counter = 0;
        for (int i = 0; i < source.length(); i++) {
            if (source.charAt(i) == target) {
                counter++;
            }
        }
        return counter;
    }
private static int countCharOccurrences ( String source , char target ) { int counter = 0 ; for ( int i = 0 ; i < source . length ( ) ; i ++ ) { if ( source . charAt ( i ) == target ) { counter ++ ; } } return counter ; }
Count number of specified char occurrences in the specified string.
Count number of specified char occurrences in the specified string .
// Loop through the string and increment the counter if the // target character found in the string. 