Java Array Length Get arrayBounds(int arrayLength, int offset, int length)

Here you can find the source of arrayBounds(int arrayLength, int offset, int length)

Description

array Bounds

License

Apache License

Declaration

public static void arrayBounds(int arrayLength, int offset, int length) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static void arrayBounds(int arrayLength, int offset, int length) {
        if (offset < 0 || length < 0 || length > arrayLength - offset) {
            throw new IndexOutOfBoundsException(
                    "array.length=" + arrayLength + ", offset=" + offset + ", length=" + length);
        }/*  ww w  .j a  va 2  s . c o m*/
    }
}

Related

  1. arrayCounter(T[] x)
  2. arrayLenght(Object array)
  3. arrayLength(Object array, int defaultIfNull, int defaultIfNotArray)
  4. arrayLength(Object o)