PHP & Java Constructors

From: Date: Wed, 29 Nov 2000 07:41:27 +0000
Subject: PHP & Java Constructors
Groups: php.general 
Request: Send a blank email to php-general+get-27787@lists.php.net to get a copy of this message
---------------------------------------------------------------------------- ----------------- Disclaimer: The information contained in this email is intended only for the use of the person(s) to whom it is addressed and may be confidential or contain legally privileged information. If you are not the intended recipient you are hereby notified that any perusal, use, distribution, copying or disclosure is strictly prohibited. If you have received this email in error please immediately advise us by return email at postmaster@normandy.com.au and delete the email document without making a copy. ---------------------------------------------------------------------------- ----------------- Hi people, Does anybody have a idea how i instatiate a Java class with a parameter as its constructor eg; class Foo { public Foo(){ // Default Constructor CreateNewFile(); } public Foo(String fileName){ // Constructor with param OpenExistingFile(fileName); } When instatiating the class i want to somehow call the constructor with the param... ie: The following calls the first not the second... $myObj = new Java("com.my.Foo"); I could try to mimic everything that the second constructor does in PHP->Java (maybe undoing all the first work) but there should be a nicer way. Any suggestions would be great. mn Mark Nold markn@enspace.com <mailto:markn@enspace.com> Senior Consultant Change is inevitable, except from vending machines.

« previous php.general (#27787) next »