How to write the following code correctly?
public String toString(int[] position, int xOffset, int yOffset) { String postn = String.format(\"[%d,%d]\", posit
When using Java 8 you could make use of the Pair class.
private static Pair foo (/* some params */) { final String val1 = ""; // some calculation final String val2 = ""; // some other calculation return new Pair<>(val1, val2); }
Otherwise simply return an array.