From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,aef01dc1d0a3a8bd X-Google-Attributes: gid103376,public From: Hyman Rosen Subject: Re: Dummy Date: 2000/02/07 Message-ID: #1/1 X-Deja-AN: 582676548 Sender: hymie@calumny.jyacc.com References: <387b154a.3533365@newsread.albacom.net> <3898C380.BC01EC03@earthlink.net> <3899DB45.B481F8E2@averstar.com> <87bt5wlt8l.fsf@deneb.cygnus.argh.org> X-Complaints-To: abuse@panix.com X-Trace: news.panix.com 949936274 23318 209.49.126.226 (7 Feb 2000 15:11:14 GMT) Organization: PANIX Public Access Internet and UNIX, NYC NNTP-Posting-Date: 7 Feb 2000 15:11:14 GMT Newsgroups: comp.lang.ada Date: 2000-02-07T15:11:14+00:00 List-Id: Florian Weimer writes: > Does this mean that that the finalization of local variables is > non-deterministic in Java? Ugh. Local variables aren't local in the usual sense: class a { interface i { int get(); void set(int n); } i local_ref() { int local; return new i { int get() { return local; } void set(int n) { local = n; } }; } static void main(String[] v) { i i1 = local_ref(); i i2 = local_ref(); i1.set(3); i2.set(4); System.out.println(i1.get()); System.out.println(i2.get()); } }