Initializing variable. I don't know their type [java]

Viewed 3791
class pair<U,V>{
U first;
V second;
public pair() {
    first = new U(); //error
    second = new V(); //error
}   
public pair(U f,V s){
    first = f;
    second = s;
}
}

required: class
found: type parameter

Is it possible to initialize first/second with (without-arguments) constructor of U/V type other way?

2 Answers
Related