say you have :
boolean[] blnArray1 = new boolean[]{true,false,true};
boolean[] blnArray2 = new boolean[]{true,false,true};
boolean blnResult = Arrays.equals(blnArray1,blnArray2);
Note : It returns true if both arrays are equal. Arrays are considered as equal. if they contain same elements in same order.
System.out.println("Are two boolean arrays equal ? : " + blnResult);
Note : Two boolean array references pointing to null are considered as equal.
No comments:
Post a Comment