Ad

This is a cool way (imo). the third boolean is never tested, simply returned!

Code
Diff
  • public class Kumite {
      public static boolean boolCheck(boolean[] bools) {
        return bools[0] == bools[1] ? bools[0] : bools[2];
      }
    }
    • public class Kumite {
    • public static boolean boolCheck(boolean[] bools) {
    • return bools[0] ? bools[1] || bools[2] : bools[1] && bools[2];
    • return bools[0] == bools[1] ? bools[0] : bools[2];
    • }
    • }