Generation

generate functionSun, 20 Nov 2022

return two ints from a function

int[] twoNum(int a, int b) { int[] twoNums = new int[2]; twoNums[0] = a; twoNums[1] = b; return twoNums; } twoNum(1, 2)

Questions about programming?Chat with your personal AI assistant