From owner-freebsd-java Thu Mar 22 19:58: 1 2001 Delivered-To: freebsd-java@freebsd.org Received: from www.kpi.com.au (www.kpi.com.au [203.39.132.210]) by hub.freebsd.org (Postfix) with ESMTP id 2E6CA37B71A for ; Thu, 22 Mar 2001 19:57:55 -0800 (PST) (envelope-from shevlandj@kpi.com.au) Received: from BLACKHAWK (pA62.hbt.southcom.com.au [203.60.23.99]) by www.kpi.com.au (8.9.3/8.9.3) with SMTP id OAA64235; Fri, 23 Mar 2001 14:57:08 +1100 (EST) (envelope-from shevlandj@kpi.com.au) From: "Joe Shevland" To: "Thomas T. Veldhouse" , "Todd Enersen" Cc: Subject: RE: possible bug in port of javac Date: Fri, 23 Mar 2001 15:00:06 +1100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal In-Reply-To: <005d01c0b341$5cedac20$1d750140@cascade> Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org This struck me as odd too, but after reading the postings I compiled a = small test on Windows JDK 1.3 that seemed to allow the initialisation to = occur in the constructor. Subclasses still won't be able to access/alter = the variable by overriding the constructor, but it kind of goes against = the meaning of 'final' to me. I wonder did Todd add the initialisation in _every_ constructor? e.g. public class test { private final int someint; public test() { someint =3D 5; } } was allowed which surprised me. The FreeBSD JDK 1.1.8 allowed it also. Regards, Joe -----Original Message----- From: owner-freebsd-java@FreeBSD.ORG = [mailto:owner-freebsd-java@FreeBSD.ORG]On Behalf Of Thomas T. Veldhouse Sent: Friday, March 23, 2001 1:31 PM To: Todd Enersen Cc: freebsd-java@FreeBSD.ORG Subject: Re: possible bug in port of javac When you declare something final, aren't you supposed to supply an = initializer? I believe this is analgous to const int m_maxValuesPerName = =3D 10 in C++. =20 private final int m_maxValuesPerName =3D 10;=20 I believe this is analgous to const int m_maxValuesPerName =3D 10; in = C++. =20 Tom Veldhouse veldy@veldy.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message