✅ Simple Java Solution
CODE\nJava []\npublic boolean isBalanced(String num) {\n    int s1=0, s2 = 0, n = num.length();\n    for(int i=0; i<n; i++) {\n        char ch = num.charAt(i);\
## **CODE**\n```Java []\npublic boolean isBalanced(String num) {\n    int s1=0, s2 = 0, n = num.length();\n    for(int i=0; i<n; i++) {\n        char ch = num.charAt(i);\n        if(i%2 == 0) {\n            s2 += (ch-\'0\');\n        } else {\n            s1 += (ch-\'0\');\n        }\n    }\n    return s1==s2;\n}\n```
['Java']