How to find the second largest number in an array in Java?
Shathana. S.R. Answered question May 29, 2023
							To find the second largest element of the given array, first of all, sort the array.
Sorting an array
- Compare the first two elements of the array
 - If the first element is greater than the second swap them.
 - Then, compare 2nd and 3rd elements if the second element is greater than the 3rd swap them.
 - Repeat this till the end of the array.
 
After sorting an array print the second element from the end of the array.
Shathana. S.R. Answered question May 29, 2023
				