Which two allow the code to compile?

Given: 1. 2. class FortyTwo { 3. public static void main(String[] args) { 4. Integer i = new
Integer(42); 5. } 6. } Which two allow the code to compile? (Choose two.)

Given: 1. 2. class FortyTwo { 3. public static void main(String[] args) { 4. Integer i = new
Integer(42); 5. } 6. } Which two allow the code to compile? (Choose two.)

A.
Add package java.lang; at line 1.

B.
Add import lang.Integer; at line 1.

C.
Add package java.lang.Integer; at line 1.

D.
Make no changes.

E.
Add import java.lang.Integer; at line 1.

F.
Add import java.lang; at line 1.



Leave a Reply 0

Your email address will not be published. Required fields are marked *