473,401 Members | 2,127 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

constructor problem

Hello, i dont understand why i get the cant resolve symbol error.

I want to start an RMI server here.

import java.rmi.*;
import java.rmi.server.*;

public class PatientServer
{

public static void main(String[] args)
{
try
{
if (System.getSecurityManager() == null)
{
System.setSecurityManager ( new RMISecurityManager());
}
Patient p = new Patient(); //////// the constructor
System.out.println("Binding...");
Naming.bind("PatientServer", p);
System.out.println("PatientServer is ready...");

}
catch (Exception e)
{
e.printStackTrace();
}
}

}
Now i have a Patient Class where the constructor exists public Patient(int
patientNummer). 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();

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
Jul 18 '05 #1
1 4406
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.
Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Lefevre | last post by:
Hello I recently had troubles with a class inheritance hierarchy. I solved it, but it didn't satisfied me. I found the solution using this forum :) Actualy i found the following message...
11
by: Amadrias | last post by:
Hi all, I am using a class to transport some data over the network. I then added the attribute to the class. My problem is that this class is part of a framework and that I do not want...
6
by: Nafai | last post by:
Hello. I want to do something like this: class A { // It's virtual protected: float* data; int n; public: A(int a); virtual float* createData(); //...
19
by: Martin Oddman | last post by:
Hi, I have a compiling problem. Please take a look at the code below. I have an application that is built upon three tiers: one data tier (Foo.DataManager), one business tier (Foo.Kernel) and...
45
by: Ben Blank | last post by:
I'm writing a family of classes which all inherit most of their methods and code (including constructors) from a single base class. When attempting to instance one of the derived classes using...
23
by: TarheelsFan | last post by:
What happens whenever you throw an exception from within a constructor? Does the object just not get instantiated? Thanks for replies.
74
by: Zytan | last post by:
I have a struct constructor to initialize all of my private (or public readonly) fields. There still exists the default constructor that sets them all to zero. Is there a way to remove the...
22
by: clicwar | last post by:
A simple program with operator overloading and copy constructor: #include <iostream> #include <string> using namespace std; class Vector { private: float x,y; public: Vector(float u, float...
13
by: JD | last post by:
Hi, My associate has written a copy constructor for a class. Now I need to add an operator = to the class. Is there a way to do it without change her code (copy constructor) at all? Your help...
9
by: Morten Lemvigh | last post by:
Is it possible to pass a pointer to a constructor or a class definition as argument to a function? Maybe in a way similar to passing function pointers...? The function should construct a number...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.