Neuromancer
10-16-2000, 12:08 AM
I have an assignment which I need to complete in a few hours from now. Although the actual logic employed in the program seems very clear to me, I find myself paralyzed by my lack of knowledge of Java (I just changed to this advanced course frm much simpler ones).
There is a function FileReader in another class which accepts a filename, opens the file, reads a set of integers stored in it as elements of an array, and then returns the array back to the main function (in the main class).
My querstion is- How do I read the returned array into an array in the main function itself?
I tried:-
int[] a;
a= objectname.FileReader("10.txt");
But I get a null-pointer error.
Any suggestions?
------------------
ICQ UIN: 42884520
Posting messages for the betterment of Humanity..
There is a function FileReader in another class which accepts a filename, opens the file, reads a set of integers stored in it as elements of an array, and then returns the array back to the main function (in the main class).
My querstion is- How do I read the returned array into an array in the main function itself?
I tried:-
int[] a;
a= objectname.FileReader("10.txt");
But I get a null-pointer error.
Any suggestions?
------------------
ICQ UIN: 42884520
Posting messages for the betterment of Humanity..