Duplicate :
|
This program should compile: public class Test { public void saveA (AbstractClass<?> busObj) { // Error here ConcreteClass sqlA = (ConcreteClass) busObj; } } abstract class AbstractClass<B> { public abstract void doSomething (B b); } class ConcreteClass extends AbstractClass<String> { public void doSomething (String b) { } } See http://forum.java.sun.com/thread.jspa?threadID=636425&tstart=0 ###@###.### 2005-06-15 18:03:19 GMT