Hey again hallowed.
newStudent is an Object, i.e an instance of class Student.
The information about newStudent is stored in newStudent Object, which has a memory reference (but forget this...
Type: Posts; User: newbie
Hey again hallowed.
newStudent is an Object, i.e an instance of class Student.
The information about newStudent is stored in newStudent Object, which has a memory reference (but forget this...
What was the point of posting that? :P
You already know he has a separate Student class, so why even bother include it in the code?
To add to my code, you simply add the object into the ArrayList after creating it, but I didn't want to burden Hallowed with that until he got to the stage where he was comfortable with creating a...
Penguin, he already has the setters and getters in another class, so the added code was not needed.
-Hallowed, reason you couldn't get 5 to work was because you were redeclaring the input scanner...
Yeah, Ok firstly start removing all code within your IF statements, its basically all wrong :P
You've already defined those methods in Student, no need to do them again.
Student newStudent = new...
Ok here's the deal. If this really is your first introduction to Java and your tutor has given you this, then in my opinion he's a complete a*se.
Reason for you getting null was that you were...