[1167] in java-interest

home help back first fref pref prev next nref lref last post

What is this error?

daemon@ATHENA.MIT.EDU (John D. Mitchell)
Fri Aug 25 07:17:53 1995

Date: Fri, 25 Aug 1995 00:47:33 -0700
From: "John D. Mitchell" <johnm@emf2-003.emf.net>
To: sbk@netcom.com
Cc: java-interest@java.sun.com
In-Reply-To: <199508242252.PAA10355@netcom12.netcom.com>

sbk@netcom.com writes:
> I don't understand this error, what am I doing wrong? This is the alpha
> 3 version.
[...Example of calling super() somewhere other than first...]

That just is *not* allowed.

Sun's Java Language Specification document (alpha v3 version) page 13
states:
	"...If a constructor calls another constructor in this class or a
constructor in the immediate super class, that call must be the first thing
in the constructor body..."

This is so that they can generate the call to the default constructor for
the super class if there's no call to the super class (or another
constructor for the same class) in the body.

Hope this helps,
		John
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post