How can I make multiple similar parts without making each one individually?

Like a bunch of different length fasteners or drive shafts where the only difference is a single length dimension. I need 24 different objects and yeah I could just make 24 but it seems like there must be an easier way of doing this and if I learned it, things could be easier in other projects. Any help is appreciated!

Answers