how to find union and intersection of two arrays in java
public static void findUnion(int arry1[],int arry1size,int arry2[],int arry2size){
HashSet<Integer> hs=new HashSet<Integer>();
for(int i=0;i<arry1size;i++){
hs.add(arry1[i]);
}
for(int i=0;i<arry2size;i++){
hs.add(arry2[i]);
}
System.out.println(hs);
}