Java tutorial
//package com.java2s; //License from project: Open Source License public class Main { public static int indexOfObject(Object[] array, Class<?> type, int sequence) { if (array == null) { return -1; } while (sequence < array.length) { if (type.isInstance(array[sequence])) { return sequence; } sequence++; } return -1; } }