Java practice questions to find second largest number
Write a program to find the second largest element in the array class Array { public static void main(String args[]) { int arr[]=new int[5]; //50 10 20 60 55 0 1 2 3 4 int i; Scanner s=new Scanner(System.in); for(i=0;i<arr.length;i++) { arr[i]=s.nextInt();// to fill the values in an array } int fmax=arr[0]; //50 […]