Java Array Sub Array subarrayEquals(int[] array, int[] subarray, int startIndex)

Here you can find the source of subarrayEquals(int[] array, int[] subarray, int startIndex)

Description

subarray Equals

License

Open Source License

Declaration

public static boolean subarrayEquals(int[] array, int[] subarray, int startIndex) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static boolean subarrayEquals(int[] array, int[] subarray, int startIndex) {
        for (int i = 0; i < subarray.length; i++) {
            if (array[i + startIndex] != subarray[i]) {
                return false;
            }//from w w  w.  j a v  a2  s.co m
        }
        return true;
    }
}

Related

  1. subArray(T[] array, int start, int end)
  2. subArray(T[] array, int startIndex, int endIndex)
  3. subArray(T[] origin, int start, int length)
  4. subarrayChar2Double(char[] orig, int off, int len)
  5. subarrayEnd(byte[] array, int offset)
  6. subarrayOf(final String[] array, final int start, final int end)
  7. subByteArray(byte[] array, int offset, int length)
  8. subset(boolean[] array, int start, int end)
  9. subset(byte[] a, int begin_index, int len)