Java Program to add two numbers

Previous
Next

In this post, we will see how to add two numbers in java. This is the most basic program of java programming language.

Output:

Enter two numbers : 5 7
Sum of two numbers is 12

If you notice, we have use Scanner to take input from user.

Previous
Next

Join Our News Letter – Stay Updated

Subscribe to Awesome Java Content.




Add Comment

Join Our News Letter - Stay Updated

Subscribe to Awesome Java Content.
You can like our facebook page Java2blog