Q about java arrays
From: johnny (squidish_at_hotmail.com)
Date: 11/30/03
- Next message: Michael G: "AWTEvents errors and deprecated methods"
- Previous message: Anthony Borla: "Re: communication between applet in user machine with application in server"
- Next in thread: Anthony Borla: "Re: Q about java arrays"
- Reply: Anthony Borla: "Re: Q about java arrays"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 30 Nov 2003 04:01:24 GMT
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 someFunctionOnSomeArray(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
someFunctionOnSomeArray( 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
- Next message: Michael G: "AWTEvents errors and deprecated methods"
- Previous message: Anthony Borla: "Re: communication between applet in user machine with application in server"
- Next in thread: Anthony Borla: "Re: Q about java arrays"
- Reply: Anthony Borla: "Re: Q about java arrays"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|