public class Main<T> {
T obj;
public Main(T input) {
this.obj = input;
}
void set(T input) {
this.obj = input;
}
void print() {
System.out.println(this.obj);
}
public static void main(String[] args) {
Main<Integer> tester = new Main<>(2);
Main test = tester;
test.print();
test.set(3);
test.print();
}
}
In the code above test.set(3) gives me a warning "Unchecked call to 'set(T)' as a member of raw type 'Main'". What is an unchecked call and why do I get it, even though the set method works and after the print statement is executed, 3 is printed.