[Java] Easy 100% solution
java\nclass Solution {\n    public int maxPower(final String s) {\n        int max = 1, count = 1;\n\n        for(int i = 1; i < s.length(); ++i) {\n           
```java\nclass Solution {\n    public int maxPower(final String s) {\n        int max = 1, count = 1;\n\n        for(int i = 1; i < s.length(); ++i) {\n            if(s.charAt(i - 1) == s.charAt(i))\n                count++;\n            else\n                count = 1;\n\n            max = Math.max(max, count);\n        }\n\n        return max;\n    }\n}\n```
['Java']