Category: How to return multiple parameter values in Java
-
How to return multiple parameter values in Java
Here’s a java tip I discovered. Java doesn’t allow functions to return multiple parameters. You can’t pass by reference like in C/C++. Say you have this function in C or C++: int get(int a, int* b, int* c){ *b = 2 * a; *c = 3 * a; return 4 * a;} Now you want…