The code you provided is written in Java and demonstrates how to get the first element from a Vector. Here's a breakdown of what the code does:
import java.util.*; public class GetFirst_Elements { public static void main(String[] args) { Vector < String > vec_list = new Vector < String > (); vec_list.add("Papaya"); vec_list.add("Apple"); vec_list.add("Grapes"); vec_list.add("Banana"); vec_list.add("Cherry"); vec_list.add("Orange"); System.out.println("First Element : " + vec_list.firstElement()); } }
First Element : Papaya
Learn All in Tamil © Designed & Developed By Tutor Joes | Privacy Policy | Terms & Conditions