Like vibrating strings and other elastic structures, shafts and beams can vibrate in different mode shapes, with corresponding natural frequencies.
The concept of vibrational modes, with their associated natural frequencies, applies to both vibrating strings and elastic structures like shafts and beams.