Array to Int
public java v1 · immutableclass ArrayToInt { private static int convertArrayToInt(int[] k) { int result = 0; for(int i = 0; i < k.length; i++) { result = k[i] + result*10; } return result; } public static void main(String[] args) { int k[] = {1, 2, 3}; int result = convertArrayToInt(k); System.out.println("Result = " + result); System.out.println("k.toString() = " + k.toString()); }}