consider the following method. public int pick(boolean test, int x, int y) { if (test) return x; else return y; }

Q&A Education