Category: Java

0

JAVA Question

What happens when this code is compiled and executed? (1 correct answer) import java.util.*; public class HelloWorld{ public static void main(String []args){ List list = new ArrayList(); list.add(null); System.out.println(list.get(0)); } } NullPointerException at seventh...