Multiple choice technology programming languages

package polymorphism; class TestSuperr { double TestPoly(long a, float b, int c) { return ((a + b) * c); } } public class TestPolym extends TestSuperr { double TestPoly(long a, double b, int c) { return (a + b + c); } public static void main(String[] args) { TestSuperr TSU = new TestPolym(); double p = TSU.TestPoly(11, 9, 10); System.out.print("p = " + p); p1 = TSU.TestPoly(11, 9.0, 10); System.out.print(" ,p1 = " + p1); } }

  1. Compiler Error

  2. p = 200.0, p1 = 30.0

  3. p = 200.0, p1 = 200.0

  4. p = 30.0, p1 = 30.0

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

This code has two compilation errors: (1) variable p1 is used without being declared, and (2) TSU is declared as TestSuperr type, which only has TestPoly(long, float, int), but the call TSU.TestPoly(11, 9.0, 10) passes a double (9.0) which cannot be implicitly narrowed to float. Java requires the reference type's method signatures to match at compile-time, and double-to-float is not an implicit conversion.