Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is Java's Object[] array a Linked List or ArrayList????

Status
Not open for further replies.

Oxymoron

Technical User
Dec 17, 2000
168
GB
Hi.
Can anyone tell me or point me to some documentation explaining how Java's Object[] array implementation is???
Are elements stored next to each other in memory like C?
Or is it like a linked list and each element points to the next?

Because I'm finding Java's array notation is alot quicker than using a LinkedList or ArrayList object.

Any and all suggestions are very welcome!
Thankyou all.

Oxy

we are all of us living in the gutter.
But some of us are looking at the stars.
 
How funny! We are on C language (Java's grandfather;)forum...
1. You can't use any knowlege about Java array memory mapping: there are no any array linearization mechanics in Java...
2. Any Java virtual machine must implement array semantics (i.e. direct access to elements via [] operation) - that's all. It may use 'next to each other', balanced tree and so on approaches. The program can't verify this details.
3. Arrays and linked lists are not rivals. It depends on the program case (design scope).
4. Formal correct but useless question?..

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top