They are electrically, but they’re attracted to other nucleons through the strong force which is about 1000 times stronger than the electromagnetic force over lengths not much larger than a nucleon diameter.
Protons by themselves in a nucleus aren’t stable and will tend to fly apart, but if you mix in a few neutrons it calms the protons down enough that they’re willing to hang with other protons in their general vicinity. This is a Goldilox situation. Too few neutrons and the protons will want to leave the nucleus. Too many neutrons and one may transform into a proton through beta decay.
Latest Answers