focode wrote:
I am developing an application , and facing a situation which needs
to be sorted out .. the problem is as follows
their is two array 1 String[] a = null;
2 String[] b = null;
in a recursive function the index value or subscript value of array
'a' will remain fixed from 0 to 10 , and every times this recursive
function is called fresh new value of 'a' will come . i want to copy
all the values of 'a' into array 'b' with a condition that : every
time the fresh value which comes in 'a' gets copied in 'b' with
increased subscript value for example when the first value of a (index
value 0 to 10 ) comes it gets copied in b with subscript value 0 to
10 , next time when fresh value of 'a' comes it will get copied in b
[11 to 20] , and so on ...
in short
first run b[0 to 10] = a [0 to 10]
second run [11 to 20 = a[0 to10 ] // these values 'a' are new values,
not the values of the first run ;
please help me solve the problem
If you can write an unambiguous specification of what you're actually
looking for, a specific reply can be offered. As things stand now, you
haven't described the method arguments or how these arrays related to
the arguments (whether they are arguments themselves, or somehow
affected by the arguments?), nor where the "new a" comes from, nor
whether the array "b" is the same for each call of the method, nor how
recursion even relates to this, etc.
Basically, we have no idea what is _actually_ going on here. You've
provided a very vague, general description, and the only information
that can be offered based on that description is so basic (i.e. "just
increment an offset into the array 'b' by 10 each iteration"), it's very
hard to believe that's actually what you're asking for.
Furthermore, your question seems to have the form "I need help with
implementation detail X", while the best questions have the form "I need
help to achieve goal Y". That is, surely you have some more fundamental
underlying goal that has led you to think that you need to copy array
contents in this way. But all you're asking about here is that actual
implementation you've settled on. You could probably get a LOT better
advice if you'd explain (concisely, precisely, and unambiguously!) what
the more fundamental underlying goal is.
Please ask the question in a better way. That way, someone can actually
help you solve the problem.
Pete
much .. actually their is not much to describe about it ...
array_push(a,b); // i need to implement this function ..