1.

Is The Below Program Written Correctly? If Yes, What Will Be The Output? Class A Implements B { Public Int Methodb(int I) { Return I =+ I * I; } } Interface B { Int Methodb(int I); } Public Class Mainclass { Public Static Void Main(string[] Args) { B B = New A(); System.out.println(b.methodb(2)); } }

Answer»

YES, PROGRAM is WRITTEN CORRECTLY. OUTPUT will be,

4

Yes, program is written correctly. Output will be,

4



Discussion

No Comment Found

Related InterviewSolutions