Aliensbrain
  • Home
  • Topics
  • Quizzes
  • Notebooks
  • Community
  • Sign in
  • programming languages Online Quiz - 177
  • package overriding; class Super5 { int testAdd(int x,int y)...

package overriding; class Super5 { int testAdd(int x,int y) { System.out.println("Super Add "+(x+y)); return(x+y); } } public class TestOverrideSub5 extends Super5{ long testAdd(int x,int y) { System.out.println("Sub Add "+(x+y)); return(x+y); } public static void main(String[] args) { Super5 s5 = new TestOverrideSub5(); s5.testAdd(5,5); } }

technology programming languages
  1. Compiler Error

  2. Exception

  3. Sub Add 10

  4. Super Add 10


Show answer
Correct Option: A

Find more quizzes:

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