• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

LOCK: (thanks AT) java help...I feel stupid.

minus1972

Platinum Member
alright...I'm getting the following error:

The constructor StudentObject(Long, String, String) is undefined
so I go to that line and see this:

StudentObject temp = new StudentObject(ID, StudentName, StudentMajor);
from there I go to the StudentObject.java file, which is in the same directory, and sure enough:

public StudentObject(long ID, String Name, String Major) {
________// constructor that creates a new StidentObject given
________// id number, name, and major
________________StudentID = ID;
________________StudentName = Name;
________________StudentMajor = Major;
________} // end StudentObject
what am I missing here?

edited for clarity.
 
One thing to do is check to make sure that you are using the primitive long type instead of the wrapper Long object. The error message indicates that constructor is expecting a Long object while you are passing in something different, most likely the long primitive type.
 
Back
Top