Both are good cameras. I just bought the D5000 and like it very much.
Pick the one that feels good in your hand.