Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Java
Why doesn't ArrayDeque implement the List interface?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Mike Schilling, post: 3810809"] This even works with ArrayList if you write Object o1 = new Object(); Object o2 = new Object(); ArrayList al = new ArrayList(); aq.add(0, o1 ); Object o3 = aq.get( 0 ); // Zero aq.add( 0, o2 ); Object o4 = aq.get( 0 ); // Zero It's far less efficient, of course, since all the items in the List need to be moved to accomodate the next first item. Anyway, the point is that any particular List implementation can define methods that modify itself in any way it likes, e .g. class SillyList extends ArrayList { public void moveStuffAroundAtRandom(); } [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Java
Why doesn't ArrayDeque implement the List interface?
Top