Should a new cat be the same or the opposite sex to the resident cat?

Should a new cat be the same or the opposite sex to the resident cat? To put it another way, when adopting a second cat, is it better to get one of the same...