You can keep more than one millipede in an enclosure, but if you have a male and female together, they will mate. To avoid having up to 2,000 millipede babies, you will want to know the differences between males and females so you can keep them separate. To identify an adult millipede'd gender look at the undercarriage.
Place the millipede in a clear container that you can view from below and look for the gonopods -- external male reproductive organs. Depending on the species, the gonopods may be on the third segment or the seventh. They are small and stumpy, and they replace the skinny legs. If you can't see them, you should at least be able to see a gap in between the regular legs where the gonopods should be.
A female millipede won't have gonopods. When you place the millipede in the plastic container and view her underside from the bottom, all of her segments will appear the same. There will be no gaps between a female's legs.
- Hemera Technologies/PhotoObjects.net/Getty Images