Nikon 50mm 1.8 G or D? What's the difference?

What is the difference between the Nikon 50mm 1.8 g vs the nikon 50mm 1.8 d?
Which one would be better?
I have a Nikon d7000, and a beginner.

The D has an aperture ring, the G does not. Optically they are the same, so buy the one you can get the best deal on (Probably the D because they are older).

As the other answer said, D has an aperture ring, and G does not.
Also note that the D version is AF, the G version is AF-S.
This means that the D version uses the screw driven autofocus motor in the camera body (your D7000 has one, entry level DSLRs do not), while the G version uses a silent wave motor inside the camera lens.
AF-S is considered to be a bit faster and also a bit more accurate than AF.
The lack of an aperture ring of the G version might be a problem if you want to use it for macro purposes with a set of extension tubes. That's not something that everyone wants to do though and might not be an issue for you.
- Is there a difference in quality between Nikon 50mm 1.8 AF and Nikon 50mm 1.8 AI-S?
- What is the difference between Nikon Nikkor AF 50mm f/1.4D and AF 50MM F1.8D Lens?
- What is the difference between Nikon primes 50mm f/1.8G and 50mm f/1.8D?
- What is the difference between AF Nikkor 50mm f/1.4D & AF-S NIKKOR 50mm f/1.4G?
- Nikkor 50mm AF-S 50mm f/1.4G or AF 50mm f/1.8G?