List of usage examples for java.util Vector lastIndexOf
public synchronized int lastIndexOf(Object o, int index)
From source file:Main.java
public static void main(String[] args) { Vector vec = new Vector(6); vec.add(6);// w w w . ja va2 s . com vec.add(5); vec.add(4); vec.add(3); vec.add(2); vec.add(1); System.out.println("index is: " + vec.lastIndexOf(1, 4)); }
From source file:Main.java
public static void main(String[] args) { Vector<String> v = new Vector<String>(); v.add("1");//from w w w. ja v a 2 s .co m v.add("2"); v.add("3"); v.add("4"); v.add("5"); v.add("1"); v.add("2"); System.out.println(v.indexOf("1", 4)); System.out.println(v.lastIndexOf("2", 5)); }