public static String fibonacci(int a, int b){
int max = 10;
String returnValue;
int[] result = new int[max];
result[0] = a;
result[1] = b;
for (int i1 = 2; i1 < max; i1++) {
result[i1] = result[i1 - 1] + result[i1 - 2];
}
for (int i3 = 0; i3 < max; i3++) {
//Here you can do something with all the values in the array one by one
//Maybe make something like this?:
int TheINTthatHasToBeAdded = result[i3];
//The line where TheINTthatHasToBeAdded gets added to the String returnValue
}
return returnValue;
}
-
-
The result array has items that are INTEGERS, returnValue is a string.
My question is; how do I add the items that are in the result array, to the returnValue array?