You need to parse it to int
Integer.parseInt(String.valueOf(s.charAt(0))) + Integer.parseInt(String.valueOf(s.charAt(1)))
More Related Contents:
- incompatible types required char found java.lang.string
- How to replace a char with a string
- String index out of range in jva
- Why is char[] preferred over String for passwords?
- Check string for palindrome
- How to convert a char to a String?
- How to convert a char array back to a string?
- How can non-ASCII characters be removed from a string?
- Putting char into a java string for each N characters
- Fastest way to iterate over all the chars in a String
- Isn’t the size of character in Java 2 bytes?
- How to convert/parse from String to char in java?
- Difference between “char” and “String” in Java
- The concatenation of chars to form a string gives different results
- In Java, how to find if first character in a string is upper case without regex
- How do I check if a char is a vowel?
- How do I apply the for-each loop to every character in a String?
- Illegal Escape Character “\”
- Java comparison with == of two strings is false? [duplicate]
- Extract digits from a string in Java
- How to check if two words are anagrams
- Java String to SHA1
- How to determine if a String has non-alphanumeric characters?
- Why does String.replace not work? [duplicate]
- Use of the String(String) constructor in Java [duplicate]
- How to add text to an image in java?
- Is Java’s assertEquals method reliable?
- How to convert String object to Boolean Object?
- Sort a single String in Java
- Understanding the difference between null and ‘\u000’ in Java