Here you can find the source of lastIndexOfRef(T[] ary, int off, int len, T value)
public static final <T> int lastIndexOfRef(T[] ary, int off, int len, T value)
//package com.java2s; //License from project: Open Source License public class Main { /** @see #lastIndexOf(Object[], int, int, Object) *//* www . j a v a 2s . c o m*/ public static final <T> int lastIndexOfRef(T[] ary, int off, int len, T value) { for (int i = off + len - 1; i >= off; i--) { if (ary[i] == value) { return i; } } return -1; } }