Page 1 of 1

Java question

Posted: Wed Jul 11, 2007 12:34 pm
by auerhantheman1
how do i return an array as a variable to the main method in java? thanks in advance :D

Posted: Wed Jul 11, 2007 12:36 pm
by Altimit01
yay google? clicky

Posted: Thu Jul 12, 2007 5:41 am
by auerhantheman1
yay nvm i figured it out another way. but thanks :D

Posted: Thu Jul 12, 2007 7:03 am
by OwnZ joO
I hope you did something like this as your solution:

Code: Select all

void main(string args[]){

int[] i = arrayMethod();

}

int[] arrayMethod(){
return new int[]{0, 1, 2};
}