[681] in java-interest

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

Re: Class.newInstance() question

daemon@ATHENA.MIT.EDU (Jonathan Payne)
Thu Jul 13 03:39:14 1995

Date: Wed, 12 Jul 1995 23:27:21 -0700
From: jpayne@starwave.com (Jonathan Payne)
To: Anselm.Baird_Smith@inria.fr
Cc: java-interest@java.sun.com
In-Reply-To: <199507121654.SAA23552@maillol.inria.fr> (Anselm.Baird_Smith@inria.fr)

You should just create your class in the normal way

	YourClass foo = new ("YourClass");

and then call a well-defined method, perhaps initialize(...) to
actually initialize it as if you had passed the args in the
constructor.

Oh, the above example should contain a cast from the new expression to
(YourClass), since it's not known at compile time what type new will
return.
-
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