Java Program to Add Two Numbers Without Using Third Variable

By: Prem Tiwari | Last Updated: | In: Java Tutorial


In this tutorial, I will explain how to write a Java program to add two numbers without using the third variable. In this program, I have declared two variables as X and Y with some values, after that, used plus operator to save both values and put the result in the first variable. Java program …