Declaring class handle as rand

thanks for the explanation.

But I am trying the code mention in the LRM,
please help me to rectify the null pointer error in the code.