Simple Solution || JAVA Understandable :)
\n# Code\n\nclass Solution {\n    public int countTime(String s) {\n        int ans =0;\n        int a4 = 1, a3 =1, a2 =1, a1 =1;\n        char[] ch = s.toCharA
\n# Code\n```\nclass Solution {\n    public int countTime(String s) {\n        int ans =0;\n        int a4 = 1, a3 =1, a2 =1, a1 =1;\n        char[] ch = s.toCharArray();\n        \n        if(ch[0] == \'?\'){\n            if(ch[1] == \'0\' || ch[1] == \'1\' || ch[1] == \'2\' || ch[1] == \'3\'){\n                a4 *=3;\n            }\n            else if(ch[1] == \'?\'){\n                a4 *= 24;\n            }\n            else if(ch[1] >= \'4\' && ch[1] <= \'9\'){\n                a4 *= 2;\n            }\n        }\n        \n        if(ch[0] != \'?\' && ch[1] == \'?\'){\n            if(ch[0] == \'2\'){\n                a3 *= 4;\n            }\n            else{\n                a3 *= 10;\n            }\n        }\n        if(ch[3] == \'?\'){\n            if(ch[4] == \'?\'){\n                a2 *= 60;\n            }\n            else {\n                a2 *= 6;\n            }\n        }\n        if(ch[3] != \'?\' && ch[4] == \'?\'){\n            a1 *= 10;\n        }\n        \n        return a1 * a2 * a3 * a4;\n    }\n}\n```
['Java']