Thanks Norm, I understand what you mean about the variables being outside the scope of the method. I also had my file opening method wrong. I now have it all working excpet for one thing. When I call...
Type: Posts; User: Rhyssa6
Thanks Norm, I understand what you mean about the variables being outside the scope of the method. I also had my file opening method wrong. I now have it all working excpet for one thing. When I call...
I can't copy & post from the Task or Build view windows but the error messages are exactly what I posted above.
In the StudentInfo file:
cannot find symbol variable inputStream ...
Dlorde, I do usually try to name my methods and objects more reasonably, that was about my 3rd copy of this assignment and I got lazy.
Norm, I've tried to do what you suggested but I cannot get it...
Here is my studentRecords code:
prac Record = new Prac();
public int studentRecords()
{
Scanner inputStream = null;
try
I now have this code working correctly (mostly) - the array reads each line in the text file and prints it out in the required format.
However I've also tried writing other code for it which has a...
This is the code I tried for making a new array:
double marks2[] = new double[5];
for (i=0; i< marks.length; i++)
{
marks[i] = marks2[i];
System.out.println(marks[i]);
}
I figured out what the problem is, but not how to fix it. Marks[] is an array of 5 doubles for each student. The array is being filled by the values on the first iteration of the loop so it doesn't...
***While loop now working, just need an argument for a method.***
I have a text file with 8 lines of information. Each line has an int (UniqueID), a string (name) and 5 doubles (marks). Each item...