Two Laptop Bag*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Polymorphism:  SCJP 1.5 Part2 -  Question: 18. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Polymorphism:  SCJP 1.5 Part2 -  Question: 18. " Watch "Polymorphism:  SCJP 1.5 Part2 -  Question: 18. " New topic
Author

Polymorphism: SCJP 1.5 Part2 - Question: 18.

Alam Ameghino
Ranch Hand

Joined: Jun 01, 2011
Posts: 60
Hi friends.

This is a question about polymorphism.

The exercise is the next:

The options are:

1.) #1
2.) #2
3.) #3
4.) #4
5.) Nowhere, since this program does not compile
6.) This program is not valid and hence there is no poymorphism

The correct answers are 2) y 3), but for me it is wrong. For me there isn't polymorphism in previous example.


Polymorphism is present in the next exercise. Here, in runtime, JVM decide what m() method is called.

Am I right?

Thanks!
Alam Ameghino
Ranch Hand

Joined: Jun 01, 2011
Posts: 60
Sorry, and the explication is: "Polymorphism is exhibited wherever a base class calls a subclass implementation".
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Polymorphism: SCJP 1.5 Part2 - Question: 18.
 
Similar Threads
Generics exercise in Head First Java 2nd ed.
Overloading
Inheritance - My example - Concept wrong
Creating Objects
ArrayStoreException pls explain?