Question: 4. Show the printout for the following program. public class Test{ public static void main(String[] args) { T t = new T(); swap (t);
4. Show the printout for the following program. public class Test{ public static void main(String[] args) { T t = new T(); swap (t); System.out.println("el } } } public static void swap (T t) { int temp = t.el; t.el = t.e2; t.e2 = temp; class T { = int el = 1; int e2 = 2; 11 + t.el + 11 11 + t.e2);
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
