StringVectorExampleII

StringVectorExampleII - //Line 5

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
//StringVectorExample / import java.util.Vector; i public class StringVectorExampleII { public static void main(String[] arg) { Vector<String> stringList = new Vector<String>(); //Line 1 stringList.addElement("One"); //Line 2 stringList.addElement("Two"); //Line 3 stringList.addElement("Three"); //Line 4 stringList.addElement("Four");
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: //Line 5 stringList.addElement(&quot;Five&quot;); //Line 6 stringList.addElement(&quot;Six&quot;); //Line 5 stringList.addElement(&quot;Seven&quot;); //Line 6 System.out.println(&quot;stringList: &quot; + stringList); //Line 7 for (String str : stringList) //Line 8 System.out.println(str.toUpperCase()); //Line 9 } }...
View Full Document

Ask a homework question - tutors are online