Detailed Easy Java Solution✅ || Beginner-friendly🤗
\n\n# Approach\n Describe your approach to solving the problem. \n1. Initialize a variable count to keep track of the number of seniors\n\n2. Iterate through th
\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n1. <b>Initialize a variable count to keep track of the number of seniors</b>\n\n2. <b>Iterate through the array details.</b>\n\n3. <b>For each element in details:</b>\n\u2022> Extract the substring from index 11 to 12 (inclusive) to get the two-digit age.\n\u2022>Convert the extracted substring to an integer using Integer.valueOf().\n\u2022>Check if the age is greater than 60.\n\u2022>If it is, increment the count.\n\n4. <b>After processing all elements, return the final value of count.</b>\n\n\n# Code\n```\nclass Solution {\n    public int countSeniors(String[] details) {\n        \n        int count = 0;\n        for (int i = 0; i < details.length; i++) {\n            int ss = Integer.valueOf(details[i].substring(11, 13));\n            if (ss > 60) {\n                count++;\n            }\n\n        }\n        return count;\n    }\n}\n```
['Java']