package myArray;

import java.util.Vector;
import java.util.List;

class VectorArray {

	static public void main(String args[]) {

		Vector<Integer> thisDecade = new Vector<Integer>(10);
		thisDecade.addAll(List.of(2020,2021,2022,2023,2024,2025,2026,2027,2028,2029));
		Vector<Double> averages = new Vector<Double>(4);
		averages.addAll(List.of(3.4, 3.7, 4.1, 2.9, 3.95));
		Vector<BankAccount> accounts= new Vector<BankAccount>(3);
		accounts.addAll(List.of(
			new BankAccount(20000),
			new BankAccount(15000),
			new BankAccount(40000) ));

		System.out.println("thisDecade[0]="+thisDecade.get(0));
		System.out.println("averages[averages.length - 1]=" + averages.get(averages.size()-1));
		System.out.println("accounts[2].getBalance=" + accounts.get(2).getBalance());
	}
}