What is the output of the following program? import java.util.Vector; public cla
ID: 3529149 • Letter: W
Question
What is the output of the following program? import java.util.Vector; public class Exercise_12 { public static void main(String[] arg) { Vector strList = new Vector () ; Vector intList = new Vector(); strList.addElement("Hello"); intList.addElement(10); strList.addElement("Happy"); intList.addElement(20); strList.addElement("Sunny"); intList.addElement(30); System.out.println("strList: " + strList); System.out.println("intList: " + intList); strList.insertElementAt("Joy", 2); intList.removeElement (20); System.out.println("strList: " + strList); System.out.println("intList: " + intList); } }Explanation / Answer
it prints hello happy 30 times