List of usage examples for java.util Arrays equals
public static boolean equals(Object[] a, Object[] a2)
From source file:Main.java
public static void main(String[] argv) throws Exception { boolean b = Arrays.equals(new byte[] { 0 }, new byte[] { 0 }); // true }
From source file:Main.java
public static void main(String[] argv) throws Exception { boolean b = Arrays.equals(new double[] { 0D }, new double[] { 0D }); // true }
From source file:Main.java
public static void main(String[] argv) throws Exception { boolean b = Arrays.equals(new short[] { 0 }, new short[] { 0 }); // true }
From source file:Main.java
public static void main(String[] argv) throws Exception { boolean b = Arrays.equals(new char[] { 'a' }, new char[] { 'a' }); // true }
From source file:Main.java
public static void main(String[] argv) throws Exception { boolean b = Arrays.equals(new float[] { 0F }, new float[] { 0F }); // true }
From source file:Main.java
public static void main(String[] argv) throws Exception { boolean b = Arrays.equals(new int[] { 0 }, new int[] { 0 }); // true }
From source file:Main.java
public static void main(String[] argv) throws Exception { boolean b = Arrays.equals(new long[] { 0L }, new long[] { 0L }); // true }
From source file:Main.java
public static void main(String[] argv) throws Exception { boolean b = Arrays.equals(new String[] { "a" }, new String[] { "a" }); b = Arrays.equals(new String[] { null }, new String[] { null }); b = Arrays.equals(new String[] { "a" }, new String[] { null }); }
From source file:Main.java
public static void main(String[] argv) throws Exception { boolean[] bArr1 = null; boolean[] bArr2 = null; boolean b = Arrays.equals(bArr1, bArr2); // true }
From source file:Main.java
public static void main(String[] args) { int[] a1 = new int[] { 2, 7, 1 }; int[] a2 = new int[] { 2, 7, 1 }; System.out.println(Arrays.equals(a1, a2)); }