News

Exercise: Swapping Two Numbers Objective: The objective of this exercise is to practice creating a program that swaps the values of two integer variables using a method that employs pass by value.
num = 20; // here it creating new object, not changing the value of the original variable. // java doesn't have pass by reference.