okay a little work on your program and I found out that it takes all inputs a, b, c, and d as Integers (since they are) and runs the Integer version of compare method.
Long can take input which ends with the L sign , indicating that it is Long number.
check this code i edited.
gives output as Integer long
RJ