1.

What Will Be The Output Of The Following Program? Abstract Class A { Abstract Void Mymethod(number N); } Interface B { Abstract Void Mymethod(object O); } Class C Extends A Implements B { Void Mymethod(number N) { System.out.println("number"); } Public Void Mymethod(object O) { System.out.println("object"); } } Public Class Mainclass { Public Static Void Main(string[] Args) { A A = New C(); A.mymethod(new Integer(121)); B B = New C(); B.mymethod(new Integer(121)); C C = New C(); C.mymethod(new Integer(121)); } }

Answer»

NUMBER

OBJECT

Number

Number

Object

Number



Discussion

No Comment Found

Related InterviewSolutions