Holler fellow programmers
I have an error that's been bugging me for almost a day now:
I keep getting 14 of this error: class, interface, or enum expected
Yes, 14 different exact same error message basically for every line of code in the inputGetter method below.
Can someone please help... I believe it's a pretty easy solution (maybe)... but I can't find it anywhere. Thanks in advance.
import java.io.*;
import java.util.*;
import java.lang.*;
public class Driver
{
public static void main (String[] args) throws IOException
{
int row = 6;
int col = 2;
double[][] array = new double[rows][cols];
inputGetter (row, col, array);
}
}
public static void inputGetter (int ROWS, int COLS, double[][] hold) //Gets input from the user ****************
{
double[][] data = new double [ROWS][COLS];
File inputFile = new File ("input.dat");
Scanner keyboard = new Scanner (inputFile);
PrintWriter outputFile = new PrintWriter ("results.out");
inputFile.useDelimiter(" ");
//reading the data file
while (inputFile.hasNext())
{
for (int i=0; i<ROWS; i++)
{
//data[i]
for (int j=0; j<COLS; j++)
{
Double temp = Double.parseDouble(inputFile.next);
data[i][j] = temp;
}
}
}
outputFile.println();
outputFile.close();
}