The longest object that can fit in a cylinder is a rod (ignoring its thickness) reaching from one end of the cylinder all the way to the other end.

This creates a right triangle with it's sides being the height of the cylinder and the diameter of the circular base.

radius = 2.25 in [So the diameter = 2*r = 4.5 in]

height = 8 in

Using the Pythagorean theorem, we can find the hypotenuse:

c^{2} = a^{2} + b^{2}

= 4.5^{2} + 8^{2}

= 20.25 + 64

c^{2} = 84.25

c = √84.25) = 9.2 inches