例如,在我的主班上,我有
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方法中进行调用?
答案 0 :(得分:-1)
使用中出了什么问题
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);
}
}