{
// Erasure replaces UpperBoundedContainer(T object) constructor by
// this one UpperBoundedContainer(IUpperTestBoundable object)
// as a result only IUpperTestBoundable object can be used as
// constructor arg raw type can't be instantiated
UpperBoundedContainer cont = new UpperBoundedContainer(new UpperBounded());
// Both UpperBounded and lower bounded can be used in instance creation.
// Class generic type can't differ from constructor argument type.
// UpperBoundedContainer<UpperBounded> cont2 =
// new UpperBoundedContainer<UpperBounded>(new LowerBounded());
//
// UpperBoundedContainer<LowerBounded> cont5 =
// new UpperBoundedContainer<LowerBounded>(new UpperBounded());
UpperBoundedContainer<UpperBounded> cont3 =
new UpperBoundedContainer<UpperBounded>(new UpperBounded());
UpperBoundedContainer<LowerBounded> cont4 =
new UpperBoundedContainer<LowerBounded>(new LowerBounded());
cont.print();
cont3.print();
cont4.print();
}