Untitled

mail@pastecode.io avatar
unknown
plain_text
12 days ago
407 B
1
Indexable
Never
import java.util.Vector;

public class Main {
    public static void main(String[] args) {
        // Creating a Vector
        Vector<String> vector = new Vector<>();

        // Adding elements to the Vector
        vector.add("Apple");
        vector.add("Banana");
        vector.add("Orange");

        // Displaying the Vector elements
        System.out.println("Vector elements: " + vector);
    }
}
Leave a Comment