summaryrefslogtreecommitdiffstats
path: root/Master/Reference Architectures and Patterns/hjp5/examples/Listing1401.java
diff options
context:
space:
mode:
Diffstat (limited to 'Master/Reference Architectures and Patterns/hjp5/examples/Listing1401.java')
-rw-r--r--Master/Reference Architectures and Patterns/hjp5/examples/Listing1401.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/Master/Reference Architectures and Patterns/hjp5/examples/Listing1401.java b/Master/Reference Architectures and Patterns/hjp5/examples/Listing1401.java
new file mode 100644
index 0000000..aca92ca
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/hjp5/examples/Listing1401.java
@@ -0,0 +1,18 @@
+/* Listing1401.java */
+
+import java.util.*;
+
+public class Listing1401
+{
+ public static void main(String[] args)
+ {
+ Vector v = new Vector();
+
+ v.addElement("eins");
+ v.addElement("drei");
+ v.insertElementAt("zwei",1);
+ for (Enumeration el=v.elements(); el.hasMoreElements(); ) {
+ System.out.println((String)el.nextElement());
+ }
+ }
+} \ No newline at end of file