List of usage examples for java.util Vector indexOf
public synchronized int indexOf(Object o, int index)
From source file:Main.java
public static void main(String[] args) { Vector<String> v = new Vector<String>(); v.add("1");//from w w w.j a va2 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)); }
From source file:Main.java
public static void main(String[] args) { Vector vec = new Vector(4); vec.add(4);/* www . ja v a 2 s . c o m*/ vec.add(3); vec.add(2); vec.add(3); vec.add(2); vec.add(3); /** let us get the index of 3 * starting search from 2nd index */ System.out.println("Index of 3 :" + vec.indexOf(3, 2)); }