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++)
			for (int j=0; j<COLS; j++)
				Double temp = Double.parseDouble(inputFile.next);
				data[i][j] = temp;


5 Years
Discussion Span
Last Post by JeffGrigg

The main problem is that the right brace ('}') on line 20 needs to be moved to the end of the file.

You want ONE '}' to close the main method. And right after that you want the 'public ... inputGetter ....' procedure.

Votes + Comments
Was a big help :D

Woah... bro... thanks a lot.
That was it.
Thank you thank you thank you :)

Edited by schoolboy2010: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.