Consider the following program:
import java.util.ArrayList; class Main { public static void main(String []args) { Class c1 = new ArrayList<String>().getClass(); // LINE A Class c2 = ArrayList.class; // LINE B System.out.println(c1 == c2); } }
Which one of the following options correctly describes the behavior of this program?
c)
With type erasure, details of the generic type are lost when the program is compiled.
Hence, at runtime, types of the instance ArrayList<String> and the raw type ArrayList are the same.