Question: 7. (8 points) Given the following Java code fragment: List targetList = new ArrayList (); List other = new ArrayList (); List scores =

7. (8 points) Given the following Java code fragment: List targetList = 

7. (8 points) Given the following Java code fragment: List targetList = new ArrayList (); List other = new ArrayList (); List scores = new LinkedList (); LinkedList names = new LinkedList (); ArrayList exile; State whether each of the following lines of code have compiling errors. (a) exile = scores; (b) exile = new List (); (c) targetList = other; (d) targetList scores; (e) other new List (); (f) scores exile; (g) scores = new ArrayList (); (h) exile targetList; 8. (4 points) Identify any four methods every class in Java inherits from the Object super- class.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!