What is this, a C# advocate's attempt at
Java misinformation?
First, run() is defined in both Car and Yugo. What happens when you call show() on a variable declared as Yugo? Who knows? Nothing was said about the definition of a show() method. If the question should be "what happens if run() is called..." then the correct answer is D, but A is the result: run() of class Yugo is executed because junker is a Yugo and Yugo overrides run().
Second, both member variables (fields) and methods are inherited independently and in exactly the same way (all public, protected and package members). The answer is C.
[ November 09, 2004: Message edited by: David Harkness ]
[ November 09, 2004: Message edited by: David Harkness ]