I want to search number in array ,where is fault in the program?
import java.util.*; public class SearchArray { public static void main(String[] args) { int arr[]=new int[3]; int i,n,n1,flag=0; Scanner sc=new Scanner (System .in); System .out .println ("size of array"); n=sc.nextlnt (); System .out .println ("enter the array element"); for(i=0;i<n;i++){ arr[i]=sc.nextlnt (); } System .out .println ("enter search number"); n1=sc.nextlnt (); for(i=0;i<n;i++){ if(arr[i]==n1){ flag=1; System .out .println ("number is present in array"); break; } } if(flag==0){ System .out .println ("number is not present in array"); } } }