Here you can find the source of indexOf(final String[] p_elements, final String p_key)
public static int indexOf(final String[] p_elements, final String p_key)
//package com.java2s; /******************************************************************************* * Copyright (c) 2011 Lab-STICC Universite de Bretagne Sud, Lorient. * All rights reserved. This program and the accompanying materials * are made available under the terms of the CeCILL-B license available * at :/*from w ww . ja va2 s .c om*/ * en : http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html * fr : http://www.cecill.info/licences/Licence_CeCILL-B_V1-fr.html * * Contributors: * Dominique BLOUIN (Lab-STICC UBS), dominique.blouin@univ-ubs.fr ******************************************************************************/ import java.util.Arrays; public class Main { public static int indexOf(final String[] p_elements, final String p_key) { if (p_elements == null) { return -1; } return Arrays.asList(p_elements).indexOf(p_key); } }