Answer:
To access the methods and fields of the target class, you need to enter a type.
Objectand LinkedListis a hierarchy of the same type, so you can use, otherwise you will get ClassCastExceptionin Java. For more information on type casting, see Link.
source
share