Aliensbrain
  • Home
  • Topics
  • Quizzes
  • Notebooks
  • Community
  • Sign in
  • programming languages Online Quiz - 185
  • package polymorphism;class TestSuperr { double TestPoly(long ...

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); }}

technology programming languages
  1. p = 200.0, p1 = 30.0

  2. p = 200.0, p1 = 200.0

  3. p = 30.0, p1 = 30.0

  4. Compiler Error


Show answer
Correct Option: D

Find more quizzes:

© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy