Java simple solution
If you found this helpful, an upvote would be appreciated! \uD83D\uDE0A\n# Java Code\njava\nclass Solution {\n    public boolean isBalanced(String num) {\n     
If you found this helpful, an upvote would be appreciated! \uD83D\uDE0A\n# Java Code\n```java\nclass Solution {\n    public boolean isBalanced(String num) {\n        int oddSum = 0;\n        int evenSum = 0;\n\n        for (int i = 0; i < num.length(); i++) {\n            int digit = num.charAt(i) - \'0\';\n            if (i % 2 == 0) {\n                evenSum += digit;\n            } else {\n                oddSum += digit;\n            }\n        }\n\n        return evenSum == oddSum;\n    }\n}\n```\n\n---\n\n### Explanation\n\n1. **Initialize Sums**: `oddSum` and `evenSum` are used to store the sums of digits at odd and even positions.\n2. **Loop Through String**:\n   - For each character in `num`, convert it to a digit.\n   - If the index `i` is even, add the digit to `evenSum`; otherwise, add it to `oddSum`.\n3. **Compare Sums**: Return `true` if `evenSum` and `oddSum` are equal, meaning the string is balanced.
['String', 'Java']