Use Arrays.equals method. Example:
boolean b = Arrays.equals(nir1, nir2); //prints true in this case
More Related Contents:
- Comparing two integer arrays in Java
- Compare two arrays of primitives in Java?
- Algorithm for taking elements from an in[] array and concatenating them [closed]
- java.lang.arrayoutofboundexception length:10 index:10
- How do i format a ArrayList for printing?
- Does an Array’s specified capacity include 0?
- How to put one dimensional array in 2d array java
- Make copy of an array
- Java Array, Finding Duplicates
- How can I convert int[] to Integer[] in Java?
- Get only part of an Array in Java? [duplicate]
- How to display a svg byte array as an image in a JasperReport?
- String comparison and String interning in Java
- Java: what’s the big-O time of declaring an array of size n?
- PDF to byte array and vice versa
- Java: BufferedImage to byte array and back
- Java Array of unique randomly generated integers
- Java Arrays.asList on primitive array type produces unexpected List type [duplicate]
- Creating nested JSON object for the following structure in Java using JSONObject? [closed]
- If a char array is an Object in Java, why does printing it not display its hash code?
- Combine two integer arrays [duplicate]
- casting Arrays.asList causing exception: java.util.Arrays$ArrayList cannot be cast to java.util.ArrayList
- How can I convert a Java HashSet to a primitive int array?
- How to remove last comma and space in array? Java [duplicate]
- Sorting two arrays simultaneously
- What does java.lang.ArrayIndexOutOfBoundsException mean? [duplicate]
- Java ArrayList how to add elements at the beginning
- How to convert byte[] to Byte[] and the other way around?
- Random element from string array [closed]
- Why does byteArray have a length of 22 instead of 20?