| Author |
Returning an Array from a Method
|
Tony Costello
Greenhorn
Joined: May 10, 2009
Posts: 2
|
|
Hello all I am attempting to write a method which gathers values from a text file, sticks em in an array and return the array.
I keep getting an error upon compiling:
java:41: '.class' expected
return age[];
Here is my code:
|
 |
Henry Wong
author
Sheriff
Joined: Sep 28, 2004
Posts: 16690
|
|
The parameter "age", is an int array, and you need to return an int array... so...
is what you want.
Henry
|
Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
|
 |
Tony Costello
Greenhorn
Joined: May 10, 2009
Posts: 2
|
|
|
Oh geez.....thanks!
|
 |
 |
|
|
subject: Returning an Array from a Method
|
|
|