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 = 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
Get step-by-step solutions from verified subject matter experts
