java equality of arrays
java equality of arrays
Scanner;
public class Main
{
public static void main(String[] args)
{
int i,j,count;
Scanner sc= new Scanner(System.in);
for(i=0;i<n;i++)
{
for(j=0;j<n;j++)
{
if(a[i]==b[j])
{
System.out.println("Both the arrays have same element");
break;
}
else
{
System.out.println("Both the array do not have same element");
break;
}
}
}
}
}