Alternative way for checking an anagram pair
This wont ever work entirely correctly. What you did here can also be seen as calculating the hash of the 2 Strings. And just like you cannot use a hash to compare equality of 2 objects, you can't use your sumOfChars to compare if 2 strings are anagrams or not. (Simple counter example are the strings "ac" and "bb".)

On the other hand, that doesn't mean this idea is useless for exactly the same reasons as why we still provide a hashCode method when implementing equals.

If the 2 strings are more often NOT anagrams then they ARE anagrams, it can be a lot cheaper to first check if the sums are equal, and after that check for actual "anagram equality".

I suggest to update your isAnagram method to something like this:

public static boolean isAnagram(String s1, String s2) {
    if(s1.length() != s2.length() return false;
    if(sumOfChars(s1) != sumOfChars(s2)) return false;
    return sameLetterCount(s1, s2);
}


Notice that I also put the length() check in this method as well. The idea is actually the same. You start with a really cheap test that returns early in certain cases (strings of different length). Then you do a bit more expensive test that takes out most (but still not all) cases to return early again.
When those tests didn't fail, you got some good candidates to do the expensive actual checking for containing the same letters.

I have written it in my example so that it calls a different method. But you might as well just implement some letter counting algorithm right after the 2 if checks.