Javatpoint Logo
Javatpoint Logo

Java Double sum() Method

The sum() method of Double class returns the sum of two double arguments same as the operation performed by '+' operator.



a- the first argument passed

b- the second argument passed

Return Value:

The sum() method returns the sum of a and b.

Example 1


Enter first number: 67
Enter second number: 98
Enter third number: -98
Sum = 67.0

Example 2


Enter your Marks of following subjects
English : 87
Maths : 98
Science : 67
S.St : 87
Hindi : 56
Computer : 45
You got 73.33333333333333%

Next TopicJava Double

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA