T
tequila
can someone help me with this problem? at least advice on how to start
it. thanks
Write a Java program that, other than an array and its size, uses no
local (other than parameters) or global memory to return the nth
element of a list . No assignment operation should appear in this
program. Your solution should expand the following code:
class nArray {
//only static initial state is allowed
static final int array[ ] = {7,3,16,41,-3,12,8,8,-1,-53 };
static final int size = 10;
//put your public static method for finding the nth element of the
array here..
static public void main(String [] argv) {
System.out.printf((" The element at position is %d is
%d%n",
4 ,
nth(array,size,4));
}
}
it. thanks
Write a Java program that, other than an array and its size, uses no
local (other than parameters) or global memory to return the nth
element of a list . No assignment operation should appear in this
program. Your solution should expand the following code:
class nArray {
//only static initial state is allowed
static final int array[ ] = {7,3,16,41,-3,12,8,8,-1,-53 };
static final int size = 10;
//put your public static method for finding the nth element of the
array here..
static public void main(String [] argv) {
System.out.printf((" The element at position is %d is
%d%n",
4 ,
nth(array,size,4));
}
}