find common elements in java array