Void value as return parameter

后端 未结 8 2351
夕颜
夕颜 2021-02-19 18:50

I have this interface:

public interface Command {
    T execute(String... args);
}

it works fine for most uses. But when I try to mode

8条回答
  •  盖世英雄少女心
    2021-02-19 19:33

    That problem is not that common, but neither that rare... I think I've seen a discussion about that some time ago, about Callables that return nothing.

    I agree with the other posters that this is a good solution, much better than using Object or some other dummy placeholder.

提交回复
热议问题