I would say option 5.
Consider these
test classes.
In line 1, you create a new instance of a Basket but all type information is erased because you created a raw Basket.
In line 2, you cause a compile-time warning to be generated because you are assigning a type safe reference equal to a raw reference.
You also do the same thing in line 3.
Line 4 is fine because bA has reference type Basket<Apple> so you can add an instance of an Apple to it.
But in line 5, the getElement method called on the reference type Basket<Orange> tries to cast the element in the Basket, which is of type Apple, to an Orange.
So you get a ClassCastException.