How old was James Dean when he died?

How old was James Dean when he died?