has auto focus,
Autofocus is a big, big range to talk about I can't speak for anyone but Nikon, but every Nikon SLR has autofocus.
The D40(x) must use an AF-S ("silent wave") lens, which has an in-lens motor. These lenses are also the priciest and fastest focusers.
Most of the other bodies have focus motors, so they'll drive autofocus lenses that don't have built in motors albeit those can be painfully slow compared to AF-S.
And then you've got the lenses without autofocusbut no modern day cameras. But hey, unless you're doing a fast-paced event, manual focus is good too.