Java examples for Language Basics:boolean
Compare Two Java boolean Arrays
import java.util.Arrays; public class Main { public static void main(String[] args) { boolean[] blnArray1 = new boolean[]{true,false,true}; boolean[] blnArray2 = new boolean[]{true,false,true}; /* w ww .j ava 2 s .co m*/ boolean blnResult = Arrays.equals(blnArray1,blnArray2); System.out.println("Are two boolean arrays equal ? : " + blnResult); } }