Java Double.compareTo() MethodThe compareTo() method of Double class compares two double values numerically. SyntaxParametersanotherDouble - the Double value to be compared Return valueThis method returns the value-
Example 1Test it NowOutput: 10.44 is greater. Answer after subtraction is= 0.4399999999999995 Example 2Test it NowOutput: Enter your percentage 48 Congrats you are eligible for the Exam.
Next TopicJava Double
|