[Java] Straightforward Clean Code
\nclass Solution {\n    public String modifyString(String s) {\n        StringBuilder str = new StringBuilder("a"+s+"z");\n        for (int i = 0; i < s.length(
```\nclass Solution {\n    public String modifyString(String s) {\n        StringBuilder str = new StringBuilder("a"+s+"z");\n        for (int i = 0; i < s.length(); i++) { \n            if (s.charAt(i) == \'?\') {\n                if (Math.min(str.charAt(i),str.charAt(i+2))>\'a\') {\n                    str.setCharAt(i+1, \'a\');\n                } else if (Math.max(str.charAt(i),str.charAt(i+2))<\'z\') {\n                    str.setCharAt(i+1, \'z\');\n                } else {\n                    str.setCharAt(i+1, \'b\');\n                }\n            }\n        }\n        return str.substring(1,s.length()+1).toString();\n    }\n}\n```
[]