There is a question related to Java generics. Please see following piece of code.
class Beta{
public void hello(){}
}
class Alpha {
public <Anything> void greet(Beta beta) {
beta.hello();
}
}
In the method greet()
, <Anything>
is not declared any where. Why does javac not throw any error in this case?