Java
\nclass Solution {\n    public int prefixCount(String[] words, String pref) {\n        int count = 0;\n        for (String word: words) {\n            if (word.
```\nclass Solution {\n    public int prefixCount(String[] words, String pref) {\n        int count = 0;\n        for (String word: words) {\n            if (word.indexOf(pref) == 0) {\n                count++;\n            }\n        }\n        return count;\n    }\n}\n```
['Java']