public static String[] getInterSection(String[] arr1, String[] arr2)
{
if(ArrayUtils.isEmpty(arr1)|| ArrayUtils.isEmpty(arr2))
{
return new String[0];
}
HashSet<String> tmpSet = new HashSet<String>();
for (int i = 0; i < arr1.length; i++)
{
for (int j = 0; j < arr2.length; j++)
{
if( !StringUtil.isNullString(arr1[i])
&& !StringUtil.isNullString(arr2[j]) )
{
if (arr1[i].equals(arr2[j]))
{
tmpSet.add(arr1[i]);
}
}
}
}
return tmpSet.toArray(new String[tmpSet.size()]);
}