Here you can find the source of and(boolean[] x, boolean[] y)
public static boolean[] and(boolean[] x, boolean[] y)
//package com.java2s; //License from project: Apache License public class Main { public static boolean[] and(boolean[] x, boolean[] y) { if (x == null || y == null || x.length != y.length) return null; boolean[] result = new boolean[x.length]; for (int i = 0; i < x.length; i++) { result[i] = x[i] & y[i]; }// w w w. ja v a 2s .c om return result; } }