Will this lense match my camera?

I'm looking for 300 mm lenses for my camera. I found one that someone is selling and i'm wondering if it will fit my camera.
It is a 70-300mm being sold with a nikon d3100. I have a nikon d3300. Will the lense fit my camera and work normally?

I'd be careful.
The lens will obviously fit, but I've seen it happen a dozen times before now that the seller bought a lens in Nikon fit without checking that it was motorised first.
Sigma made a nice, attractively priced 70-300mm, which many people bought, and then found out the hard way that with no internal motor, it wouldn't autofocus on the D3xxx/D5xxx series (Nikon are the only manufacturer who have this problem, since Canon ONLY use lens motors, and all Pentax/Sony bodies have them).
Before you buy, Google the lens' make and model, and if the seller won't give you such information, go somewhere else. Cheap 70-300mm lenses waste your money. When you shop for lenses, make sure you only look at lenses that come with a Nikon mount. If you can't live without autofocus, you must get lenses with a built-in focus motor. With Nikon, these are labeled with the AF-S and AF-I specs. AF only is not enough.

Cheap 70-300mm lenses waste your money.

When you shop for lenses, make sure you only look at lenses that come with a Nikon mount. If you can't live without autofocus, you must get lenses with a built-in focus motor. With Nikon, these are labeled with the AF-S and AF-I specs. AF only is not enough.
- Make a Nikon camera match a canon cameras image colors?
- Should shutter speed match frame rate when recording video with a Nikon Z6? Or any camera for that matter?
- Good camera with cheap lense vs cheap camera with good lense?
- What's the lowest shutter speed suitable for a football match in nikon D7000?
- Best way to take action shots at a volleyball match with a Nikon D50?