Home / Programming MCQs / JAVA MCQs / Question
T
Q. What will be the output of given code
import java.util.ArrayList; import java.util. Iterator; import java.util. List; public class ArrayListTest { public static void main (String args[]) { List<String> arrayList = new ArrayList<String>(); arrayList.add(“a”); arrayList.add(“b”); Iterator<String> iterator = arrayList.iterator(); while (iterator.hasNext()) { System.out.println(iterator.next()); arrayList.add(“c”); } } }
No solution found for this question.
Add Solution and get +2 points.
You must be Logged in to update hint/solution
Which of the following are legal lines of Java code?
Java Ternary operator is sometimes called ____.
What will Collections.sort internally uses when number of elements are less than 7?
Which of the following is used to find and fix bugs in the program?
Identify the correct way of declaring constructor.
What is the output of the below Java program with a "this" operator?
What is an event in delegation event model used by Java programming language?
For storing a value, double uses
The JDBC API is what allows access to a data source from a Java middle tier
Discusssion
Login to discuss.