ferkheusa:
but why the same code worked for Jeremy and not for me. I did the same thing. This means I have some problems with the Xbees not the code of the arduino
No, it probably means that you have some problems with the Xbees as well as the problems PaulS pointed out with the code of the Arduino.