xxxxxxxxxx
Person person = new Client();
Client clientAgain = (Client) person; // it's ok
Employee employee = (Employee) person; // the ClassCastException occurs here
/*You can always cast an object of a subclass to its superclass.
It may also be possible to cast an object from a superclass type to a subclass,
but only if the object is an instance of this subclass, otherwise a ClassCastException
will be thrown. Be careful when casting a class to its subclass.
*/