public static int min(int... p) { int h = 0; for (int i = 0; i < 4; i++) { h = Math.min(p[i], p[i + 1]); p[i + 1] = h; } return h; }