Answer :

They all have two kind of polarity, positive and negative. And the parts with same polarity will reject each other while the parts with different polarity will attract each other.