1/**
2 * Copyright(C) 1998
3 * All Rights Reserved. Salih Yurttas, ZCubes, BitsOfCode Software Systems, Inc..
4 *
5 * Permission to use, copy, modify, and distribute this
6 * software and its documentation for EDUCATIONAL purposes
7 * and without fee is hereby granted provided that this
8 * copyright notice appears in all copies.
9 *
10 * @date : January 1, 1998.
11 * @author : Salih Yurttas.
12 */
13
14
15import java.util.Vector;
16
17public class A04 {
18
19 public static void main(String[] args) {
20
21 A a = new A();
22
23 a.printA();
24
25 int i = a.getFirst();
26
27 System.out.println("first = " + i);
28
29 i = a.getLast();
30
31 System.out.println("last = " + i);
32
33 System.out.println();
34
35 Vector b = new Vector();
36
37 b = a.getA();
38
39 System.out.println("first = " + b.elementAt(0));
40 System.out.println("last = " + b.elementAt(1));
41
42 System.out.println();
43
44 a.printA();
45
46 a.setFirst(5);
47 a.setLast(9);
48
49 a.printA();
50
51 a.setA(4,3);
52
53 a.printA();
54
55 a.setA(b);
56
57 a.printA();
58
59 }
60
61}