IntelliJ Java IDE
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Problem with the 2nd Constructor of Data class Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Developer Certification (SCJD/OCMJD)
Reply Bookmark "Problem with the 2nd Constructor of Data class" Watch "Problem with the 2nd Constructor of Data class" New topic
Author

Problem with the 2nd Constructor of Data class

Vivian Richards
Greenhorn

Joined: Jun 19, 2001
Posts: 7
Initial Scneario:
I have my Remote server named RMIDataServer containing the Data object.
All the calls to the RMIDataServer are delegated to the Data object.
This RMIDataServer is created from a server application named FBNServer. FBNServer takes the database name as the command line argument.
Now the question:
Since the Data has two constructors, my RMIDataServer also has two constructors. The problem is with the second constructor which takes FieldInfo[] as a parameter. Since FBNServer instantiates RMIDataServer, it needs to pass this information. But how do your pass array of FieldInfo objects as input using the command line.
Please let me know what i am missing.
Thanks,
Rick Fortier
Ranch Hand

Joined: Jun 04, 2001
Posts: 147
Originally posted by Vivian Richards:
Initial Scneario:
I have my Remote server named RMIDataServer containing the Data object.
All the calls to the RMIDataServer are delegated to the Data object.
This RMIDataServer is created from a server application named FBNServer. FBNServer takes the database name as the command line argument.
Now the question:
Since the Data has two constructors, my RMIDataServer also has two constructors. The problem is with the second constructor which takes FieldInfo[] as a parameter. Since FBNServer instantiates RMIDataServer, it needs to pass this information. But how do your pass array of FieldInfo objects as input using the command line.
Please let me know what i am missing.
Thanks,

The second constructor is used to create a brand new database using the field names you specify. This has no usefulness in the assignment.
Catherine McManus
Greenhorn

Joined: Oct 23, 2000
Posts: 19
Some people (like me) instead of getting a binary file (db.db) get a load of text that has to be converted into a binary file. That is where the extra constructor can be used. If you are one of the lucky people who already have db.db, you probably wont use it.
Catherine
 
 
subject: Problem with the 2nd Constructor of Data class
 
Threads others viewed
Immutable Data structure
Too Simple?
Final check before submission
lock/unlock & synchronized
A question on threads
IntelliJ Java IDE