1 public static void findIntersection(int arry1[],int arry1size,int arry2[],int arry2size){
2 HashSet<Integer> hs=new HashSet<Integer>();
3 for(int i=0;i<arry1size;i++){
4 for(int j=0;j<arry2size;j++){
5 if(arry1[i]==arry2[j]){
6 hs.add(arry1[i]);
7 }
8 }
9 }
10
11 System.out.println(hs);
12 }