What will be the output of the program?


			  		

Loading

Choose the correct option.

What will be the output of the program?

import java.util.*;  
class I {
public static void main (String[] args) {
Object i = new ArrayList().iterator();
System.out.print((i instanceof List)+",");
System.out.print((i instanceof Iterator)+",");
System.out.print(i instanceof ListIterator);
}
}

 

A. Prints: false, false, false
B. Prints: false, false, true
C. Prints: false, true, false
D. Prints: false, true, true