Question: Java Outputs: Search, Sort, Classes and Objects 21. Show the output of the following program: 1 public class Test [ 2 3 4 5 6
Java Outputs:


Search, Sort, Classes and Objects 21. Show the output of the following program: 1 public class Test [ 2 3 4 5 6 7 public static void main (String [] args) t int [ ] a = {1, 2}; swap (a [0], a[1]); System.out.println (" a[0] "+ a[0] + 8public static void swap (int nl, int n2) 9 int temp = n1; n1 = n2; n2 - temp; 10 12 13
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
