int is a primitive type and Integer is an object with an int. When we call doSum(10, 20), we are calling doSum(int, int). By default, Java use double to represent its floating point literals. When we call doSum(10.0, 20.0), we are calling doSum(double, double).