[Java] a, b, c solution beats 100% - comment explained
\nclass Solution {\n    public String modifyString(String s) {\n        char[] ch = s.toCharArray();\n        for (int i = 0;i<ch.length;i++){\n            if (
```\nclass Solution {\n    public String modifyString(String s) {\n        char[] ch = s.toCharArray();\n        for (int i = 0;i<ch.length;i++){\n            if (ch[i] == \'?\'){\n                for (char j = \'a\'; j <= \'c\';j++){\n                    if (i > 0 && ch[i-1] == j) continue; //skip if previous character is one of a,b,c\n                    if (i < ch.length-1 && ch[i+1] == j) continue; //skip if next character is one of a,b,c\n                    ch[i] = j; //set with the current character from a,b,c\n                    break;\n                }\n            }\n        }\n        return new String(ch);\n    }\n}\n```
['Java']