+ 3
How to create a function that returns more than one parameter
6 Réponses
+ 7
Perhaps return an object with several fields?
+ 4
Mustafa Coder, this is taged Java
+ 3
Sonic
You can that by call refference, that's means you make changing directly on variable's value by address.
Ex:
int x=3, y=4;
swap(x,y);
void swap (int &x,int &y)
{ int z;
z=x; x=y; y=z; }
Then you will not need to return any value, in same way to object variable.
+ 2
Or Hashtable. Which is closest to dictionary or associative array.
+ 2
zemiak
Oh! sorry, I didnt note that, I thougt it in C or C++, I havnt any knowledge about java.
+ 1
Add the name inside parenthesis. If multiple perameters then seperate with a comma.