How to store and add two integer numbers | Java Examples

preview_player
Показать описание
In this program, you'll learn to store and add two integer numbers in Java. After addition, the final sum is displayed on the screen.

In this program, two integers 70 and 77 are stored in integer variables first_number and second_number respectively.

Then, first_number and second_number are added using the + operator, and the result is stored in another variable sum.

Finally, the sum is printed on the screen using the println() function.
Рекомендации по теме