Article View: borland.public.jbuilder.java.language
Article #7900Re: Threads
From: John McGrath TeamB
Date: Sat, 12 May 2001 10:41
Date: Sat, 12 May 2001 10:41
26 lines
1741 bytes
1741 bytes
On 11 May 2001 15:25:54 +0200, Tor Iver Wilhelmsen wrote:
> The static method calls the current thread's sleep();
> this may be a different thread than t.
I think they will both cause the current thread to sleep. They both
call the static Thread.sleep() method, and that affects the current
thread.
Java allows you to prefix a call to a static method with either the
class name or an reference of the class type. But in both cases, it
calls the static method, and that method has no way of knowing which
way the call was specified.
I think it is pretty strange that it allows this, but I have heard some
that like this aspect of the Java language. I think it causes more
confusion than it is worth.
--
Regards,
John McGrath [TeamB]
---------------------------------------------------
Before sending me e-mail, please read:
http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID:
<MPG.1566d634c908421f98a1cf@forums.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.sj.google.com!newsfeed.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnewsReferences:
<3afbe0e4_1@dnews> <u3dacaufx.fsf@sds.no>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,8c03226f2bf37eeb X-Google-Attributes: gidf74b3,public X-Google-ArrivalTime: 2001-05-12 04:10:07 PST From: John McGrath [TeamB] <ng-b@JPMcGrath.net> Newsgroups: borland.public.jbuilder.java.language Subject: Re: Threads Date: Sat, 12 May 2001 06:41:16 -0400 Message-ID: <MPG.1566d634c908421f98a1cf@forums.borland.com> References: <3afbe0e4_1@dnews> <u3dacaufx.fsf@sds.no> X-Newsreader: MicroPlanet Gravity v2.30 NNTP-Posting-Host: 209.92.40.60 X-Trace: dnews 989664076 209.92.40.60 (12 May 2001 03:41:16 -0700) Lines: 26 X-Authenticated-User: jpmcgrath Path: arc1-ca.pugleaf.net!archiver1.sj.google.com!newsfeed.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews