Jump to content
  • 0

Value for Int[]


Question

Posted

I would like to know how I get the value of a list, for example I configured a list like this 100;100;100;30;30, I just want to retrieve the values 100 and get the value of 3 as would be done by an int[ ] ?

2 answers to this question

Recommended Posts

  • 0
Posted

Your question is a bit unclear, if you're looking for a value at a specific index in the list, you may use List.get(index) method. It's similar to what you would use in an array, for example if you want the 2nd element of an array you would use: array[1], if you want the same element from a list you would use: List.get(1). Remember that for lists, like arrays, index starts from 0 and not from 1.

 

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...