Depends on how hard the breakup was, on the nature of the relationship and on the people involved. To stay friends, there must be no expectations of getting back together.
E and I dated for 3 years, but there were no great feelings involved, we hung out and had a great time, but both of us were agreed that we were too young to be too serious. I got a job in Chicago and had to move in a week and a half. We broke up but remain good friends to this day. We also work together and sit a few cubes apart. We have no desire to ever be together again, but that is because we are different people and want very different things out of life now.
J and I dated for 2 years, and the breakup was very, very bad. To this day, his friends can't even mention my name in his presence with out him throwing a fit (I'm a horrible person because after paying for almost everything in our relationship I wouldn't buy him a house). Anyway, we will never be friends, and probably will never be able to be in the same room together.
Two very different examples, but the honest answer is it depends.