getNumericValue way
IntuitionConvert string to int by using Character.getNumericValue(num.charAt(i));after that if index is even then add to even or otherwise to oddcheck if they m
# Intuition
Convert string to int by using Character.getNumericValue(num.charAt(i));

after that if index is even then add to even or otherwise to odd

check if they match, if not return false.

# Code
```java []
class Solution {

		public static boolean isBalanced(String num) {

			int even = 0;
			int odd = 0;

			for (int i = 0; i < num.length(); i++) {
				int c = Character.getNumericValue(num.charAt(i));
				
				if(i % 2 == 0) {
					even += c;
				}else {
					odd += c;
				}
			}
			return even == odd;
		}
}
```
['Java']