I\'m just practicing some MIT java assignments. But, I\'m not sure how to find the second largest number. http://ocw.csail.mit.edu/f/13
public class Marath
private void secondLargest(int arr[]){ int maxOne=arr[0]; int maxTwo=arr[1]; for(int i=0;imaxOne){ maxTwo=maxOne; maxOne=arr[i]; }else if (arr[i]>maxTwo) { maxTwo=arr[i]; } } System.out.println(maxOne); System.out.println(maxTwo); }