Someone wrote a generic class that I wish to test. It looks something like:
public class < E > foo{
public static void main(String[] args){
do_stuff();
}
}
I have another class which tries to test the above function's main method as follows:
public class Test{
public static void main(String[] args){
foo<Integer>.main({"hello"});
}
}
Why doesn't this work? What is the correct way to do this? Note: It is possible the problem is with their code and not with mine, but I can't confirm this.