Rýchlosť Java

PHOTO EMBED

Tue May 04 2021 07:41:02 GMT+0000 (UTC)

Saved by @GoodRequest.

public int countLetter(String string, char letter) {
        int count = 0;
        for (int i = 0; i < string.length(); i++){
            if (letter == string.charAt(i))
                count++;
        }
        return count;
    }
content_copyCOPY