我想要在參數中接收函數,並使用一個參數調用它:
在參數列表中給出參數的調用函數
public static <T> T foo(Callable<T> func)
{
return func.call("bar");
}
But it call doesn't take any parameter. Any idea on how can I do this?
No matter how much I search, I dont find anything that help me...
我不明白。你想調用一個不帶任何參數的函數,並帶有參數? – Mat