How to return multiple objects from a Java method?

前端 未结 25 3083
眼角桃花
眼角桃花 2020-11-21 23:55

I want to return two objects from a Java method and was wondering what could be a good way of doing so?

The possible ways I can think of are: return a HashMap<

25条回答
  •  孤街浪徒
    2020-11-22 00:23

    PASS A HASH INTO THE METHOD AND POPULATE IT......

    public void buildResponse(String data, Map response);

提交回复
热议问题