Test case for Mobile phonebook
Anonymous
To find the second largest: Take 2 variable first and second and traverse once. public void secondSmall(int [] arr){ int first,second; //if size of array is small if (arr.length first && arr[i]< second){ second=arr[i]; } } System.out.println("Second largest number is " +second); }
Check out your Company Bowl for anonymous work chats.