Some rams are solid, some are not. Smaller ones, with rams up to about 2" are likely to be solid. Larger ones are pieces of pipe. Remember, not only must the cylinder contain hydraulic pressure, but it also must maintain mechanical pressure. On larger cylinders, tubing is sufficient.
Most modern forklift lift cylinders are hollow tubing. Most tilt cylinders, with smaller rams are a piece of chromed cold roll steel.
The barrel of the cylinder, which contains the ram, is a piece of hollow seamless tubing.
The older multistage cylinders on forklifts, had a ram, inside a ram, inside a ram, etc. Obviously all were hollow. the stationary ram, the one upon which all the others worked, was usually a very heavy made hollow tube.
Modern hydraulic cylinders are only better than standard pipe in that they are seamless.
Some of the cyl's on heavy equipment, may have up to 3" or so solid rams, but even then, larger cyl.s have hollow rams.