|
|
| Data Structure | Access Discipline | Size |
| Arrays | Random Access | fixed |
| Vector | Random Access | resizes automatically |
| Stack | LIFO | java.util.Stack has no size limits as it is based on java.util.Vector |
| Queue | FIFO | depends on the implementation |
![]() | Native arrays are more efficient than instances of Vector.
|
![]() | Stacks and queues can be very efficiently implemented
even if they have no size limits (on base of LinkedList).
|
![]() | Vectors are flexible but implicit resize operations
and removals can be costly (linear complexity as compared
to constant complexity in case of linked lists).
|
|
| Copyright © 2001, 2002 Andreas Borchert, converted to HTML on February 11, 2002 |