Java Array Last Index Of lastIndexOf(String str, String[] path)

Here you can find the source of lastIndexOf(String str, String[] path)

Description

last Index Of

License

Apache License

Declaration

private static int lastIndexOf(String str, String[] path) 

Method Source Code

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

public class Main {
    private static int lastIndexOf(String str, String[] path) {
        for (int i = path.length; 0 < i; i--) {
            if (path[i - 1].compareTo(str) == 0) {
                return i - 1;
            }//from www  . ja v a 2  s.  c  o  m
        }
        return -1;
    }
}

Related

  1. lastIndexOf(Object o, Object[] vals)
  2. lastIndexOf(Object[] array, Object object)
  3. lastIndexOf(Object[] array, Object objectToFind)
  4. lastIndexOf(Object[] elements, Object value)
  5. lastIndexOf(String source, char[] chars)
  6. lastIndexOf(T[] array, T valueToFind, int startIndex)
  7. lastIndexOfAny(byte[] values, byte[] array)
  8. LastIndexOfAny(String str, char[] search)
  9. lastIndexOfAny(String str, char[] searchChars, int startPos)