In Java, I want to create a list based on part of an array, for example, those starting from position 2 (indexed of course from 0) to position 8, what is the convenient way of doing so without explicitly looping?
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
EDIT:
To create a variable-size arraylist, use the following: