TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
How To Add Two Biggest Decimal Number In Java
Alagunila Meganathan
Jul 25
2016
Code
658
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
import
java.math.BigDecimal;
public
class
AddTwoBigNumbers{
public
static
void
main(String[] args) {
BigDecimal num1, num2;
num1 =
new
BigDecimal(
50.00035
);
num2 =
new
BigDecimal(
100.0025
);
Sum(num1, num2);
}
public
static
void
Sum(BigDecimal val1, BigDecimal val2){
BigDecimal sum = val1.add(val2);
System.out.println(
"Sum of two BigDecimal numbers: "
+ sum);
}
}
Add Two Biggest Decimal Number
Java