Article View: be.comp.programming
Article #2263Re: java this.
From: Pieter Philippaerts
Date: Sun, 01 Aug 2004 23:57
Date: Sun, 01 Aug 2004 23:57
20 lines
1585 bytes
1585 bytes
"Dirk" <d.bollen@pandora.be> wrote in message
> Nu vraag ik me al een tijdje af waarvoor 'this.' staat?
'this' is een object referentie waarmee een object een referentie naar
zichzelf mee kan opvragen.
> Waarvoor gebruikt met dit?
public class SomeClass {
private int myVar;
public void myMethod(int myVar) {
this.myVar = myVar;
}
}
Zonder 'this' zou je hier een probleem hebben.
Mvg,
Pieter Philippaerts
Technical Details
Message-ID:
<1091404643.500206@seven.kulnet.kuleuven.ac.be>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.icl.net!newsfeed.fjserv.net!syros.belnet.be!ikaria.belnet.be!news.belnet.be!not-for-mailReferences:
<vwSJc.187073$Y_5.9163872@phobos.telenet-ops.be>Show Full Headers
Complete Article Headers
X-Google-Thread: fcea4,9b938d26cb386f05 X-Google-Attributes: gidfcea4,public X-Google-Language: DUTCH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.icl.net!newsfeed.fjserv.net!syros.belnet.be!ikaria.belnet.be!news.belnet.be!not-for-mail From: "Pieter Philippaerts" <Pieter.nospam@mentalis.org> Newsgroups: be.comp.programming Subject: Re: java this. Date: Mon, 2 Aug 2004 01:57:23 +0200 Organization: KULeuvenNet Lines: 22 Message-ID: <1091404643.500206@seven.kulnet.kuleuven.ac.be> References: <vwSJc.187073$Y_5.9163872@phobos.telenet-ops.be> NNTP-Posting-Host: seven.kulnet.kuleuven.ac.be X-Trace: ikaria.belnet.be 1091404643 25556 134.58.127.12 (1 Aug 2004 23:57:23 GMT) X-Complaints-To: abuse@belnet.be NNTP-Posting-Date: Sun, 1 Aug 2004 23:57:23 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Cache-Post-Path: seven.kulnet.kuleuven.ac.be!unknown@localhost X-Cache: nntpcache 2.4.0b5 (see http://www.nntpcache.org/)