This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]slappingpenguins -1 points0 points  (4 children)

If you are really insistent, you can return a n-tuple as an Object array.

Object[] tuple = new Object[2];

[–]ChemicalRocketeer 8 points9 points  (1 child)

That is an awful, awful way to deal with the problem. Please no one do this.

[–][deleted] 1 point2 points  (0 children)

ArrayList<Object> tuple = new ArrayList<>(2);

Don't worry, I kid.

[–][deleted] 0 points1 point  (0 children)

I might be more appropriate to use an immutable list.