Nikon Digital SLRs and Lenses - It used to be so simple.
Until quite recently, virtually all Nikon 35mm autofocus lenses worked with all Nikon digital SLR camera bodies. That has gradually changed, with older lenses now only suitable for certain cameras. In particular the new Nikon D40 D40X, D60, D3000 and the Nikon D5000 will only work with AF-S Nikon lenses, or with certain Sigma, Tamron or Tokina lenses which have focus motors built into the lens - Most Nikon lenses used to be focused by a motor built in to the camera body. Also lenses with a G in their name don’t have an aperture ring, and DX lenses will work with any Nikon digital SLR camera but can’t be used with film - their imaging circle is only big enough for the smaller APS-C sized sensors in most Nikon digital SLR’s, not for full frame Nikons like the D3 or D700, where they will work but in a cropped frame mode. The best advice with Nikon lenses now is to always ask about compatibility, even buying a new lens. In most cases, if it’s a Nikon, it’ll work but possibly only with manual focus - All the above lenses worked fine with my Nikon D70, Nikon D90, Nikon D300 and Fuji S2 Pro.
With Sigma and other independent makers, it’s a little more complicated. Few will autofocus with the new lighter Nikon DSLRs, but may be OK with the Nikon D90, D300 etc. - so check before you buy. Tokina and Tamron lenses, unless they’re very old, are usually OK with these cameras, but not with the Nikon D40, D40X, D60, D3000 or D5000 unless they have a built in focus motor.
Nikon always used to pride themselves in maintaining compatibility between all their lenses and all their cameras. Unfortunately it’s got much more complicated over the last few years.
So always check before you buy - Even with new lenses.