import java.util.* class ArrayLargeAndSmall { int []a; //instance variable public static void main(String a[]) { ArrayLargeAndSmall oa=new ArrayLargeAndSmall(); oa.findOutLargeAndSmall(); } ArrayLargeAndSmall() { Scanner inp=new Scanner(System.in); System.out.print("Enter } void findOutLargeAndSmall() { int large=a[0]; int small=a[0]; for(int i=0;i
large) large=a[i]; if(a[i]<small) small=a[i]; } System.out.println("largest no"+large); System.out.println("Smallest number"+small); }