Yes, they can do quite well if properly introduced. It's generally ok as long as there are no females in the same room (if there are, it can get nasty).
It depends on the pigs. You might want to put a flimsy barrier between them and let them sniff each other, just like cats... most will eventually get along :)