static int absShortMax(short[] l) { int x = 0; if (l != null) for (short i : l) x = max(x, abs(i)); ret x; }