Here you can find the source of invert(boolean[] result)
private static boolean[] invert(boolean[] result)
//package com.java2s; public class Main { private static boolean[] invert(boolean[] result) { for (int i = 0; i < result.length; i++) result[i] = !result[i];// w w w . java 2s .com return result; } }