1
In c# there is the function numeros.GetRange(0, quant);
I would like to know the equivalent function of numeros.GetRange(0, quant); of C# in Java
1
In c# there is the function numeros.GetRange(0, quant);
I would like to know the equivalent function of numeros.GetRange(0, quant); of C# in Java
3
To take a piece of a list and put it in another, you can use the subList().
You must pass as parameter the initial index (will be included in the new list) and the final (will not be included in the new list);
Ex.:
ArrayList<Integer> novaLista = numeros.subList(0, indexFinal);
Browser other questions tagged java c#
You are not signed in. Login or sign up in order to post.
What is
numeros? OneList?– Jéf Bueno
@jbueno yes is
ArrayLis numeros = new ArrayLis();– Vale
You could improve your question. Instead of searching for a "translation" of
GetRange, request a function to create a new list based on elements from an existing list. (Just to score, the negative wasn’t mine, I think that’s a good question, it just wasn’t well crafted).– Jéf Bueno
@jbueno now you talking I understood this function, because I did not know
– Vale
Perfect, good to help you!
– Jéf Bueno