Article View: borland.public.jbuilder.java.language
Article #17437Re: Instantiate from name?
From: Steve Schafer (TeamB)
Date: Sun, 08 Nov 1998 00:00
Date: Sun, 08 Nov 1998 00:00
14 lines
1146 bytes
1146 bytes
On Sat, 07 Nov 1998 22:52:14 GMT, dchamberlinNOSPAM@dlawton.com (Doug Chamberlin) wrote: >However, if I typecast it to the ancestor class and then call >Process() the resulting method that is called is the ancestor's >Process() method, right? No. If that were true, the entire object-oriented programming paradigm would fall apart. Virtual method calls are late-bound: That is, the compiler doesn't make a direct call to the method; instead, at run time, the VM examines the object instance against which the method is going to be invoked, and selects the appropriate method to call. -Steve
Technical Details
Message-ID:
<3660ee28.177830907@90.0.0.40>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<3644cdb7.167040536@wingate>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,4e9770e191c7aab0 X-Google-Attributes: gidf74b3,public From: pandeng@telepath.com (Steve Schafer (TeamB)) Subject: Re: Instantiate from name? Date: 1998/11/08 Message-ID: <3660ee28.177830907@90.0.0.40> X-Deja-AN: 409498724 Content-Transfer-Encoding: 7bit References: <3644cdb7.167040536@wingate> Content-Type: text/plain; charset=us-ascii Organization: TeamB Mime-Version: 1.0 Reply-To: pandeng@telepath.com Newsgroups: borland.public.jbuilder.java.language