How am I supposed to print this to my console and make it show an array that i declared in my method?
import java.util.Arrays;
public class FibonacciSequence
{
public int fibonacci( int numArray[])
{
for ( int i = 0; i < numArray.length; i++ )
{
System.out.println( numArray[i] + numArray[i-1]);
}
return numArray[10];
}
public static void main(String[] args)
{
}
}
When im trying to print it like:
System.out.println(fibonacci());
it doesn't work, so how am I supposed to do this?
I just want to know how to print it in my console.