[44] in java-interest

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

Re: Strange "new" syntax

daemon@ATHENA.MIT.EDU (Jeremy Fitzhardinge)
Thu May 4 12:35:27 1995

From: jeremy@sour.sw.oz.au (Jeremy Fitzhardinge)
Date: Thu, 4 May 1995 16:11:17 +1000 (EST)
To: java-interest@java.Eng.Sun.COM

> It creates a new instance of the class named by the string argument.
> It can be any expression resulting in a string as long as it
> results in a valid public class name. The return type is Object.

What does it do about calling a constructor?  Does it call the
default/no-arg constructor?  I noticed where it's used there's
code like
	i = (FormItem) new("browser.forms.text");
	// ...
	i.initialize(f, form, this);

Does this mean a class has to be written with this kind of use in
mind?

	J

-
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