[Java] Easy 100% solution
java []\nclass Solution {\n    public boolean digitCount(final String num) {\n        final int[] count = new int[10];\n        final char[] digits = num.toChar
```java []\nclass Solution {\n    public boolean digitCount(final String num) {\n        final int[] count = new int[10];\n        final char[] digits = num.toCharArray();\n\n        for(final char digit : digits)\n            count[digit - \'0\']++;\n\n        for(int i = 0; i < digits.length; ++i)\n            if(count[i] != digits[i] - \'0\')\n                return false;\n\n        return true;\n    }\n}\n```
['Java']