java – Printing the sums of numbers with only 1 loop

            public class nawar {

public static void main (string)[] args) {
System.out.printf ("The sum of the numbers in the range% d to% d is% d% n", 1, 4, sumRange (1, 4));
System.out.printf ("The sum of the numbers in the range% d to% d is% d% n", 2, 5, sumRange (2, 5));
System.out.printf ("The sum of the voice in the range% d to% d is% d% n", 47, 47, sumRange (47, 47));
System.out.printf ("The sum of the numbers in the range% d to% d is% d% n", -12, 5, sumRange (-12, 5));
System.out.printf ("The sum of the voice in the range% d to% d is% d% n", 7, 2, sumRange (7, 2));


}

public static int sumRange (int i1, int i2) {
int sum = 0;
for (int i = i1; i <= i2; i ++)
sum + = i;

sum of return
}

}

I want you to print the following numbers: 10 14 47 – 1 -1
But I have 10, 14, 47, -63 and 0.
How do I change and what should I do?