Two ways compare Java Double

This sample shows two ways compare Java Double object with another Double object or two dobule primitive values using methods of java.lang.Double class

Output

First number is greater
Value c1 = 1
Second number is greater
Value c2 = -1

Leave a Comment

*

Please share it if you found this useful
Hide Buttons