Question: Which line in the main() method doesnt compile or points to a class that doesnt compile? A. Line 21. B. Line 22. C. Line 23.

Which line in the main() method doesn’t compile or points to a class that doesn’t compile? 

1: interface Comic { 2: void draw(C c); 3: 4: } class

A. Line 21.

B. Line 22.

C. Line 23.

D. Line 24.

E. None of the above. All of the code compiles.

1: interface Comic { 2: void draw(C c); 3: 4: } class ComicClass implements Comic { public void draw (C c) { System.out.println(c); 5: 6: 7: 8: } 9: class SnoopyClass implements Comic { public void draw (Snoopy c) { System.out.println(c); 10: 11: 12: } 23: 24: 25: 26: } } 13:} 14: class SnoopyComic implements Comic { 15: public void draw (C c) { 16: System.out.println(c); 17: 18:} 19: public class Snoopy { 20: 21: 22: } public static void main(String[] args) { Comic c1 = c-> System.out.println(c); Comic c2= new ComicClass (); } Comic c3 = new Snoopy Class (); Comic c4 = new SnoopyComic ();

Step by Step Solution

3.50 Rating (153 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To determine which line in the main method doesnt compile or points to a class that doesnt compile w... View full answer

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 Oracle Questions!