Skip to content

Instantly share code, notes, and snippets.

@rickyclarkson
Forked from ohcibi/A.java
Last active December 17, 2015 10:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rickyclarkson/5598844 to your computer and use it in GitHub Desktop.
Save rickyclarkson/5598844 to your computer and use it in GitHub Desktop.
public abstract class A<T> {
public T b;
public A(T b) {
this.b = b;
}
}
public abstract class B {
}
public class ConcreteA extends A<ConcreteB> {
public ConcreteA(ConcreteB b) {
super(b);
}
}
public class ConcreteB extends B {
}
//....
ConcreteB b = new ConcreteB();
ConcreteA a = new ConcreteA(b);
//....
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment