Swapping of Two Numbers

Here we will see the swapping of two numbers using two different methods. In first method we exchange the values using the temporary variables and in second method Swapping of numbers without temporary variable. Swapping of numbers is the way of exchanging the values in the variables. Suppose there are two variables a and b, The variable a has a value 15 and the variable b has the...

Addition of Two Numbers

In this program we will see the addition of two numbers using two different methods. In first program we specify the values of two numbers in the program itself. And in second program take the both numbers entered by user and add. In third program we use add () function. Adding the numbers using java programming is same logic as add the numbers using other programming languages. Adding...

Back to Top