Why can I cast to a parametrized type?
GJ does not admit casting to a parametrized type. It cannot do this safely, since no run-time type information is maintained. But there are situations where a type conversion from Object to a parameterized type is essential, for instance when reading back serialized data. This task can be solved using GJ’s “raw types” feature. The primary purpose of raw types is to maintain backwards compatibility with current Java. But the feature can also be exploited to achieve casting, as follows: Say, you have a variable Vector