Static methods are not polymorphic. The method that is invoked is determined by the reference type of the variable (by the type).
The object type determines which implementation is executed for overridden methods. The object type corresponds to the instantiated class.
-------
static method s.greeting() - the method that is invoked is determined by the reference type of the variable
s.name() - the object type determines which implementation is executed for overridden methods.
D is correct, static method not override, only instance method because has the same signature and name is override. When uses a Super class variable and access to static method is the methods of that class
D is correct
Because instance method cannot override the static method from Super
And Potter will be printed because other method will be overriden by instance method
So Good night, Potter will printed.
A is correct , static methods are class bound hence are not inherited
upvoted 1 times
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
ASPushkin
5 months, 2 weeks agod7bb0b2
1 year, 1 month ago[Removed]
1 year, 5 months agoOmnisumem
1 year, 5 months agotmuralimanohar
1 year, 7 months agoStavok
1 year, 8 months agoMukes877
1 year, 8 months agoRP384
1 year, 11 months agoTADIEWA
2 years, 1 month agoTADIEWA
2 years, 1 month ago