Question 1
Consider the following Java code.
1. class Fridge {2. public final void cool() {3. System.out.println("Cools the fridge");4. }5. }6. class Compressor {7. public final void start() {8. System.out.println("Starts compressor");9. }10. }11. class DoubleDoorFridge extends Fridge, Compressor {12. public void cool() {13. System.out.println("Cools the double door fridge");14. }15. }16. public class Test {17. public static void main(String[] args) {18. DoubleDoorFridge f1 = new Fridge();19. DoubleDoorFridge f2 = new Compressor();20. }21.}Identify the line/s which has/have error.
Line 2
Line 7
Line 11
Line 12
Line 18
Line 19