Simple | Easy | JAVA Solution (100%)
\n# Code\n\nclass Solution {\n    public int prefixCount(String[] words, String pref) {\n        int count=0;\n        for(int i=0;i<words.length;i++)\n        
\n# Code\n```\nclass Solution {\n    public int prefixCount(String[] words, String pref) {\n        int count=0;\n        for(int i=0;i<words.length;i++)\n        {\n            if(words[i].startsWith(pref))count++;\n        }\n        return count;\n    }\n}\n```
['String', 'String Matching', 'Counting', 'Java']