Here you can find the source of areEquals(Object... objs)
public static boolean areEquals(Object... objs)
//package com.java2s; //License from project: Open Source License public class Main { public static boolean areEquals(Object... objs) { boolean areEquals = true; if (objs != null && objs.length > 1) { for (int i = 0; i < objs.length - 1 && areEquals; i++) { areEquals &= (objs[i] == null && objs[i + 1] == null) || (objs[i] != null && objs[i].equals(objs[i + 1])); }/*from ww w . j a va 2 s .co m*/ } return areEquals; } }