Declaration of arrays

From: Novum (novum_at_NOSPAMwanadoo.nl)
Date: 02/28/05


Date: Mon, 28 Feb 2005 14:22:22 +0100

L.S.,

I have three classes: SchoolClass, Student and Main.

Within main I call Schoolclass in which a load method resides. What load
basically does is reading with BufferedReader the contents of a text file.
Within schoolclass.txt you have the values 'student: grade' on a maximum of
forty lines.

Within the Schoolclass class I read the contents of the text file into an
array. I succeed in this from within the SchoolClass class. But when I am in
the main, I want to reprint the contents of the array. ClassArray[i] from
Main returns null, so it is basically refering to an empty reference. Can
anybody give a simple example of how to use an array declared and filled
within another class?

So:
Main -> print content of array again, declared and filled in SchoolClass
SchoolClass -> read text file and fill array and print content on screen
Student -> just a blueprint for a student (1 element of array(String name,
double grade))

Many thanks for your respons.

Grtx,
Novum