Here you can find the source of allEqual(int[] arr)
public static boolean allEqual(int[] arr)
//package com.java2s; public class Main { /** Returns true if all values in the array are equal. Args: Array */ public static boolean allEqual(int[] arr) { for (int i = 0; i < arr.length; i++) { if (arr[0] != arr[i]) return false; }//from w w w .j a v a 2 s .c o m return true; } }