例如,在我的主类中,我有
public class main
{
// main method
public static <T extends Building<T>> T houseAll(T input)
{
// random information
}
public static void main(String[] args)
{
// This is where I will make the call
}
}
那么,如何从main类中的泛型静态方法调用main方法呢?
使用有什么问题
public class main {
// main method
public static <T extends Building<T>> T houseAll(T input) {
// random information
return null;
}
public static void main(String[] args) {
// This is where I will make the call
houseAll(null);
}
}