Article View: borland.public.jbuilder.java.language
Article #15168Re: internal classes and methods
From: Tor Iver Wilhelmsen
Date: Fri, 02 Jul 1999 00:00
Date: Fri, 02 Jul 1999 00:00
13 lines
1096 bytes
1096 bytes
"Marcel van den Dungen" <info@c-content.nl> writes: > I thought it would be impossible to call the doThis()-method in > the internal class (MyInternalClass), but it seems to be no problem. > Why is it possible to do such a call? And is this a proper solution? Because the inner class "knows" about its relevant instance of the outer/parent class. Basically your "doThis()" is turned into a (MyClass.this).doThis(). Now, if you made MyInternalClass a _static_ inner class, then it would fail unless you also made doThis() static, because static inner class constructors are not given an instance of the parent class.
Technical Details
Message-ID:
<u6743zf76.fsf@sds.no>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7lfv3u$qn13@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,d0974d1e5be948a3 X-Google-Attributes: gidf74b3,public From: Tor Iver Wilhelmsen <tor.wilhelmsen@sds.no> Subject: Re: internal classes and methods Date: 1999/07/02 Message-ID: <u6743zf76.fsf@sds.no> X-Deja-AN: 496327478 Sender: towi@SDSA1761 References: <7lfv3u$qn13@forums.borland.com> Organization: Another Netscape Collabra Server User Newsgroups: borland.public.jbuilder.java.language