0
How to return an array
HOW DO I RETURN AN ARRAY FROM A FUNCTION ???
9 Answers
+ 3
+ 2
Will you please share your code?
+ 2
Try this:
int[] array = new int [5] ={1,2,3,4,5}
+ 2
You can also see this:
https://code.sololearn.com/crHJueSW8KR3/?ref=app
+ 1
ok thanks
0
I am sorry but it is too confusing, I just learnt about methods
0
i did the same things except creating an int array, but it tells me that i can’t implicitly convert int array type to int type
0
public static int[] GetNumbers
{
int [] array=new [] {1,2,3,4,5};
return array;
}
- 2
Hi