I am porting some C# code over to Java. I am having trouble with the where Syntax, specifically new(). I understand that where is similar to Java's generic: T extends FOO.
How I can replicate the new() argument in Java?
ie:
public class BAR<T> : BAR
where T : FOO, new()
Here is how I implemented cletus's solution:
public class BAR<T extends FOO> extends ABSTRACTBAR {
public BAR(T t) throws InstantiationException, IllegalAccessException{
t.getClass().newInstance();
this.value = t;
}
}