They say that correct answer is 4, doStuff() from B class gets called...
I dont understand why this should be, if we declare doStuff() method to be static then correct answer would be 3., doStuff() from A class would be called... they didnt say if method doStuff() was declared with default acces modifier or with static so I think that question should be more specific about acces modifier , plz correct me if I am thinking wrong
kind regard Igor [ February 19, 2005: Message edited by: Igor Stojanovic ]
Thx for quick answer I should learn english better first then java (english is my 3rd language)
kind regards Igor
Joined: Dec 06, 2001
For the record, the question could be stated much more clearly by giving the code for class A and class B. In fact, if the code includes System.output.println() calls, the question could just ask what the output of the program would be.
And I would have never guessed that English is not your native language. You write very clearly and with correct grammar.