Like the others have suggested, try it out. A few years ago, when I owned a male and a female I had to put each of their cages at different corners of the room because the male caused quite a ruckus trying to get to the female.
(chewing on the corners of the cage nearest to her or attempting to scramble up the side of the cage) So, it really all depends on the hamsters.