Find Sum of 2 numbers in Java

Find Sum of 2 numbers in Java

Find Sum of 2 numbers in Java



Write a Java program to find the sum of 2 integers.




In this program we simply add 2 number. this is simple code to add any two int type numbers in java.

Write a Java program to Get two number from user in Dialog box and then print Sum of both Numbers.



In this code we get input from user using Dialog box, in this code we import JOption, and with help of JOption we get input in dialog box, when this code runs it show a dialog box to get input and in the same way output display in dialog box.

Write a java program to Get tho number from user in console and print Sum both of numbers.



In this code we Import Scanner to get input from user, there are different ways in java to get input from user, by using this class we get input in console(cmd) or terminal in linux.

0 Response to "Find Sum of 2 numbers in Java"

Post a Comment