Arraylist syntax Question tia sal

  • Thread starter Thread starter sal
  • Start date Start date
S

sal

Greets,

I'm trying to access individual records and fields of records in an
arraylist
but I'm having trouble. I thinks it's a syntax problem.

Why doesn't arraylist.age(1) give me '67' in the example below
what's the proper syntax? Can arraylist do this or do I have to switch to
a plan array?

Example
Name: Age: Ht:
john 14 56
sally 67 43
bill 34 76


Tia
 
Correct syntax will be
arraylist[1]

Regards,

Deepak
[I Code, therefore I am]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top