I have turned a mistake I made into a mock exam question. I hope that you are either amused if you know the answer to the question below, or informed if you didn't.
What is the result? a. Compile error b. Run time error c. Compiles and runs fine, but produces no output.
posted 13 years ago
John, Thats an interesting question. I guessed the answer but checked it just in case On working more on your code, I have a strange code here. I dont know how it works but anybody is free to interpret this
The result of this code is Hello A constructor (prints only once) I thought this should print infinitely because we are instantiating a B object in A's constructor and this will in turn invoke A's constructor because A is its superclass Am I missing something? Thanks in advance, Sri :roll: