We are passing a char primitive as argument for the method sum.
The method sum(int c) is called because char is a subtype of int (char <: int), so there is a widening conversion from char to int. Other primitives will have a similar behavior, and their subtype relationship is given by:
byte <: short <: int <: long <: float <: double; and char <: int
I think you are wondering why the method sum(Object c) is not called. Suppose we remove method sum(int c), now sum(Object c) will be called. This is because the char primitive will be autoboxed into a Character object, and Character is a subtype of Object.
However, in the given code, autoboxing will not occur here because there is a method available that takes in int (a supertype of char), which is more preferable.