Here we want to iterate through all the elements of a Vector of type String.

Java Code:
Vector <String>vecCurrency = new Vector<String>();
vecCurrency.add("Euro");
vecCurrency.add("Dollar");
vecCurrency.add("Dinar");
		
Iterator it = vecCurrency.iterator();
		
while(it.hasNext())
System.out.println(it.next());