Home / MCQ Bank / Computer
Computer Collections Framework In Java Difficulty: Medium

What will be the output of the following Java program? import java.util.*; class Collection_iterators { public static void main(String args[]) { ListIterator a = list.listIterator(); if(a.previousIndex()! = -1) while(a.hasNext()) System.out.print(a.next() + " "); else System.out.print("EMPTY"); } }

Select the correct option to test your answer:

More Computer Questions

How does IndexedDB provide atomicity? What is the purpose of the pass statement in a loop? What is the space complexity of the in-order traversal in the recursive fashion? (d is the tree depth and n is the number of nodes) What is the use of Namespace? What will be the output of the following C# code? static void Main(string[] args) { string s1 = "Hello"; string s2 = "hello"; if (s1 == s2) Console.WriteLine("Equal"); else Console.WriteLine("Unequal"); if (s1.Equals (s2)) Console.WriteLine("Equal"); else Console.WriteLine("Unequal"); Console.ReadLine(); }