236,452 views
32 votes
32 votes
"Look at the following code. Which line will cause a compiler error?

Line 1 public class ClassA
Line 2 {
Line 3 public ClassA() {}
Line 4 public final int method1(int a){ return a;}
Line 5 public double method2(int b){ return b;}
Line 6 }
Line 7 public ClassB extends ClassA
Line 8 { Line 9 public ClassB(){}
Line 10 public int method1(int b){ return b;}
Line 11 public double method2(double c){ return c;}
Line 12 }"

a. Line 4
b. Line 5
c. Line 10
d. Line 11

User Duan
by
2.8k points

1 Answer

24 votes
24 votes

Answer:

i got a feeling c

Step-by-step explanation:

User Tiago Mendes
by
2.9k points