Re: Q about java arrays
From: Jéjé (jerome.eteve_at_it-omics.com)
Date: 12/02/03
- Next message: Moth: "Create java image from Jpanel without displaying"
- Previous message: Alex Ostrikov: "Call CORBA object from servlet"
- Next in thread: SMC: "Re: Q about java arrays"
- Reply: SMC: "Re: Q about java arrays"
- Maybe reply: Raymond DeCampo: "Re: Q about java arrays"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 02 Dec 2003 10:10:27 +0100
Dans l'article <oYdyb.73078$Vs1.54284@twister.austin.rr.com>, "johnny"
<squidish@hotmail.com> a tapoté :
> in C++, you can fake a sub-array by passing something like (array +
> int)
...
> and we have the data array
> int[] data = { 1,2,3,4,5,6,7,8,9,0 };
...
> 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?
AFAIK, there's no way to pick a slide from an array, for instance like
that: int[] data = {1,2,3,4,5,6,7} ; getting data[5..data.length-1] is
impossible.
Maybe someone will explain this java drawback.
Anyway, I think it's never a good idea to use primitive types when using
Objects is possible. I've never been confortable about this primitive-object
mix of java. When you read the api, it sometimes look like Sun guys think
everybody have an infinite amount of RAM, but hey, they still use 'int'
as constants instead of static instances. Why ? Saving a few kBytes ?
-- -- A day without sunshine is like a day without orange juice. ---------------------------- jerome.eteve_at_it-omics.com
- Next message: Moth: "Create java image from Jpanel without displaying"
- Previous message: Alex Ostrikov: "Call CORBA object from servlet"
- Next in thread: SMC: "Re: Q about java arrays"
- Reply: SMC: "Re: Q about java arrays"
- Maybe reply: Raymond DeCampo: "Re: Q about java arrays"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|