easy to understand java
```\nclass Solution {\n    public String modifyString(String s) {\n        char[] arr = s.toCharArray();\n        for(int i = 0; i < arr.length; i++){\n        
```\nclass Solution {\n    public String modifyString(String s) {\n        char[] arr = s.toCharArray();\n        for(int i = 0; i < arr.length; i++){\n            if(s.charAt(i) != \'?\')\n                continue;\n            for(char ch = \'a\'; ch <= \'z\'; ch++){\n                if(satisfies(arr, ch, i)){\n                    arr[i] = ch;\n                    break;   \n                }\n            }\n        }\n        return new String(arr);\n    }\n    \n    public boolean satisfies(char[] arr, char ch, int index){\n        return satisfiesLeft(arr, ch, index) && satisfiesRight(arr, ch, index);\n    }\n    \n    public boolean satisfiesLeft(char[] arr, char ch, int index){\n        if(index == 0)\n            return true;\n        return arr[index - 1] != ch;\n    }\n    \n    public boolean satisfiesRight(char[] arr, char ch, int index){\n        if(index == arr.length - 1)\n            return true;\n        return arr[index + 1] != ch;\n    }\n    \n}
[]