Simple Java solution
\nclass Solution {\n    public int scoreOfString(String s) {\n        int sum = 0;\n        for (int i = 0; i < s.length() - 1; i++) {\n            sum += Math.
```\nclass Solution {\n    public int scoreOfString(String s) {\n        int sum = 0;\n        for (int i = 0; i < s.length() - 1; i++) {\n            sum += Math.abs((s.charAt(i) - \'0\') - (s.charAt(i + 1) - \'0\'));\n        }\n        return sum;\n    }\n}\n```
['Java']