When installing a new version of Xcode, you may want to keep your existing installation as well. One way to do that is to first rename your current Developer folder before installing the new version.
To rename your Developer folder, open the terminal and type the following:
sudo mv /Developer /Developer4.0
In the case above, I rename my current install (4.0) to Developer4.0. I then install Xcode 4.2 at the default Developer folder.
12 hours ago