Re: constructor problem
Irlan agous wrote:
Now i have a Patient Class where the constructor exists public Patient(int
patientNummer).
Here you indicate that the constructor for the Patient class requires an
integer.
So i dont understand why it will not initialize the
constructor. Patient.Class exists in the same package. I get this error
always: symbol : constructor Patient ()
location: class sapa.Patient
sapa.Patient p = new Patient();
Here you have attempted to use a no-argument constructor of the Patient
class, which apparently does not exist. You must pass an integer to the
Patient constructor.
Can somebody help me please. Even i want to send the code, and you can take
a look, also for payment if neccesary, becouse i cant get it to work and i
want to learn it so badly,
Thanks in advance
Irlan
HTH,
Ray
--
XML is the programmer's duct tape.
.
Relevant Pages
- Re: Problem with passing objects to button handling code...
... I have an big array of Patient and Field data. ... ArchiveAcknowledge aa = new ArchiveAcknowledge ... Because you haven't created a constructor that takes this argument ... (comp.lang.java.gui) - Re: Constructor doesnt work
... > Patient patient = new Patient; ... > symbol: constructor Patient ... you can't instantiate it that way. ... Look up in your Patient class with which ... (comp.lang.java.help) - Re: copy contructor
... > I'm writing some code in object oriented Perl, ... about overloading the = operator as a copy constructor. ... > the variables of a class / package. ... accessed as a hash variable named by the package name followed by two ... (comp.lang.perl.misc) - Re: enforce override of method
... public void foo() ... abstract class B_Base extends A { ... same package) a protected or public one. ... And of course anyone who mentions that A's constructor could have code ... (comp.lang.java.programmer) - Re: passing a Factory to a method to create a generic instance
... IOStream ios = new FileIOStream; ... I'd rather do it all properly in the constructor myself, so that we have a guarantee that in all cases, instances are properly initialised. ... Read a token from the stream, associate that token with a class, instantiate the class with newInstance. ... JUnit makes unit test objects that are part of the same package as the classes they test. ... (comp.lang.java.programmer) |
|