wood burning stoves 2.0*
The moose likes Mock Exam Errata and the fly likes Jaworski mock - an example of polymorphism (overriding or overloading?) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Mock Exam Errata
Bookmark "Jaworski mock - an example of polymorphism (overriding or overloading?)" Watch "Jaworski mock - an example of polymorphism (overriding or overloading?)" New topic
Author

Jaworski mock - an example of polymorphism (overriding or overloading?)

sreelakshmi sarma
Ranch Hand

Joined: Mar 02, 2000
Posts: 130
Hi all,
I found this one in Jaworski's mock exam.
Which is an example of polymorphism.
a. inner classes.
b. anonymous classes.
c. method overloading.
d. method overriding.
I picked d. But the answer is c. Could some one please help me with this.
Thanks.
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
D) like you.
I think it's a typo in their answer.
JR
Eric Barnhill
Rancher

Joined: Feb 25, 2000
Posts: 233

I would also say d. Overriding is what causes a polymorphism issue, not overloading.
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
I also agree, and so I'll move this to Mock Exam Errata.


"I'm not back." - Bill Harding, Twister
VVed
Greenhorn

Joined: Apr 07, 2000
Posts: 3
Method overloading is one of the ways that Java implements polymorphism.
Overridden methods allow Java to support run-time polymorphism.
ie. Overridden methods are another way that Java implements the "one interface, multiple methods" aspect of polymorphism.
this answer is according to my knowledge gained from a book called "The Complete Reference (JAVA2 third edition)"
please check pg.158(Overloading Methods) & pg.215(Overridden Methods)
if this is not the case then please give me a detailed explaination for this.
Mahesh Hegde
Greenhorn

Joined: Apr 24, 2000
Posts: 13
I think that both over-riding and overloading are forms of Polymorphism - "one interface, multiple implementations". But most of the OOP books claim that over-riding is the 'true polymorphism' as it allows runtime polymorphism.
Originally posted by VVed:
Method overloading is one of the ways that Java implements polymorphism.
Overridden methods allow Java to support run-time polymorphism.
ie. Overridden methods are another way that Java implements the "one interface, multiple methods" aspect of polymorphism.
this answer is according to my knowledge gained from a book called "The Complete Reference (JAVA2 third edition)"
please check pg.158(Overloading Methods) & pg.215(Overridden Methods)
if this is not the case then please give me a detailed explaination for this.


hegdemk
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Jaworski mock - an example of polymorphism (overriding or overloading?)