Easiest Java Code || Beginner Friendly || Easiest Code Ever 🔥🔥🔥
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public int countMatches(List<List<String>> items, String ruleKey, String ruleValue) {\n        int result = 0;\n        \n        for(int i = 0 ;i<items.size();i++){\n            if(ruleKey.equals("type") && items.get(i).get(0).equals(ruleValue)) result++;\n            if(ruleKey.equals("color") && items.get(i).get(1).equals(ruleValue)) result++;\n            if(ruleKey.equals("name") && items.get(i).get(2).equals(ruleValue)) result++;\n        }\n        \n        return result;\n        \n    }\n}\n```
['String', 'Java']