Java - getConstructor() ?
- by msr
Hello,
I wrote the question as a comment in the code, I think its easier to understand this way.
public class Xpto{
protected AbstractClass x;
public void foo(){
// AbstractClass y = new ????? Car or Person ?????
/* here I need a new object of this.x's type (which could be Car or Person)
I know that with…