hello.
in C++, you can fake a sub-array by passing something
like (array + int). If this was passed to something that
takes an array as a parameter, the function will deal
with the array using the int as the starting value.
for example....
if we have some function with the declaration
void someFunctionOnS omeArray(int[] a)
and we have the data array
int[] data = { 1,2,3,4,5,6,7,8 ,9,0 };
and then we call it with
someFunctionOnS omeArray( data + 5 );
the function will have as the array "a" the values
{ 6,7,8,9,0 }
My Question:
Is there a way to do the same thing in java?
thanks
~johnny
in C++, you can fake a sub-array by passing something
like (array + int). If this was passed to something that
takes an array as a parameter, the function will deal
with the array using the int as the starting value.
for example....
if we have some function with the declaration
void someFunctionOnS omeArray(int[] a)
and we have the data array
int[] data = { 1,2,3,4,5,6,7,8 ,9,0 };
and then we call it with
someFunctionOnS omeArray( data + 5 );
the function will have as the array "a" the values
{ 6,7,8,9,0 }
My Question:
Is there a way to do the same thing in java?
thanks
~johnny
Comment