On Apr 10, 2:03 am, Anthony Slater <[email protected]> wrote:
>The Student class has StudentRecord class as an instance variable. Name it as
>studentRecord, but this class has to be the >same name as the file
The sentence "Name it as studentRecord" refers to the instance
variable of the Student class, not to the name of the Student class.
You could have guessed it if you had been paying attention to the case
of the first later of the name (lower case, so it cannot be a class
name).
. How can I have studentRecord class in a file named Student.java.
>
> Also, Does studentId serve the same purpose as the studentCount.
No, absolutely not. The studentId is just an identification number for
a particular student, while the studentCount is the number of students
in the class.
You could have for example two students in the class (in the education
sense of the term, not in Java sense), hence studentCount would be
two, and their studentID could be 10001001 and 10001002 to refere to
an hypothetical class named 10001.
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---