[Java] easy and short  %100 memory
if you like it pls upvote\n\nJava \n\nclass Solution {\n    public int countMatches(List<List<String>> items, String ruleKey, String ruleValue) {\n        int r
if you like it pls upvote\n\nJava \n```\nclass Solution {\n    public int countMatches(List<List<String>> items, String ruleKey, String ruleValue) {\n        int res = 0;\n        \n        for(int i = 0 ;i<items.size();i++){\n            if(ruleKey.equals("type") && items.get(i).get(0).equals(ruleValue)) res++;\n            if(ruleKey.equals("color") && items.get(i).get(1).equals(ruleValue)) res++;\n            if(ruleKey.equals("name") && items.get(i).get(2).equals(ruleValue)) res++;\n        }\n        \n        return res;\n        \n    }\n}\n```
['Java']