Easy Approach || Java ||😊✅
Intuition\n Describe your first thoughts on how to solve this problem. \nIn this problem we\'ll be traversing the array and at idx 11 and 12 we have to apply co
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n*In this problem we\'ll be traversing the array and at idx 11 and 12 we have to apply condition of age greater than 60.*\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n## *Step-1:*\n*For having age more than 60 , idx. 11 can have value equal to 6 and idx. 12 can have value grater than or equal to to 1(for ex. 61,62,63..)\nAlso increment the value of count if it meets the conditions..*\n```\nif (details[i].charAt(11) -\'0\'== 6 &&\n    details[i].charAt(12)-\'0\' >= 1) {\n    count++;\n }\n```\n## **Step-2:**\n***A*t*  idx 11 if the value is more than 6 then also it meets the conditions..\nIncrement the value of count..\n(**charAt(i) will return a character and string. charAt(i)- \'0\' will return the actual\xA0integer\xA0value**)***\n```\nelse if(details[i].charAt(11)-\'0\'>6 ){\n    count++;\n }\n```\n\n# Complexity\n- Time complexity:O(n)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public int countSeniors(String[] details) {\n        int count = 0;\n        for (int i = 0; i < details.length; i++) {\n            if (details[i].charAt(11) -\'0\'== 6 &&\n                    details[i].charAt(12)-\'0\' >= 1) {\n                count++;\n            }\n            else if(details[i].charAt(11)-\'0\'>6 ){\n                count++;\n            }\n        }\n        return count;\n    }\n}\n```
['Java']