InterviewSolution
Saved Bookmarks
| 1. |
Is The Below Program Written Correctly? If Yes, What Will Be The Output? Interface I { Class C { Int I; Public C(int I) { This.i = ++i; } Int Methodc() { Return ++i; } } } Public Class Mainclass { Public Static Void Main(string[] Args) { I.c C = New I.c(000); System.out.println(c.method()); } } |
|
Answer» YES, PROGRAM is WRITTEN CORRECTLY. OUTPUT will be, 2 Yes, program is written correctly. Output will be, 2 |
|