File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes int/char??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "int/char???" Watch "int/char???" New topic


Lakshmi Manikantan
Ranch Hand

Joined: Jun 14, 2001
Posts: 30

The o/p is:-
Starting Process...
shouldn't it be 'R'instead of 'S'. though the one with int arg is inherited in the subclass the one with char arg is more specific, isn't it?? can somebody help me out!!!
[I added UBB CODE tags to your source code to make it more readable. Please try to use
them in the future. Learn more about UBB codes here - Ajith ]

[This message has been edited by Ajith Kallambella (edited July 17, 2001).]
[This message has been edited by Thomas Paul (edited July 17, 2001).]

Alokesh Phukan

Joined: May 24, 2001
Posts: 21
There is no method named InheritanceTest() taking char as argument in the class Process. So there is no dynamic lookup(needs method to be defined in both subclass & Baseclass). And the invocation of the method taking int in class Process takes place printing 'S' instead of 'R' as you expected.
Originally posted by Lakshmi Manikantan:

Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
See this thread for more:

Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
I agree. Here's the link:
subject: int/char???
It's not a secret anymore!