how to create vector elements
Answers
Answered by
3
Answer:
import java.util.*;
public class VectorExample {
public static void main(String args[]) {
//Create a vector.
Vector<String> vec = new Vector<String>();
//Adding elements using add() method of List.
vec.add("Tiger");
vec.add("Lion");
Answered by
3
Answer:
Vectors are declared with the following syntax: vector<type> variable_name (number_of_elements); The number of elements is optional.
pls follow meee. ....
Similar questions