Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Stack and Queue Implementation

 
kri shan
Ranch Hand
Posts: 1460
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How the Data Structure - Stack and Queue is implemented in Java ?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All the data structures like these are provided by the Collections framework.
 
Joe Ess
Bartender
Pie
Posts: 9258
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java.util.Stack extends java.util.Vector, which is a self-sizing linear array.
java.util.LinkedList is a doubly-linked list that also declares stack and queue data structure methods (i.e. get, remove, insert).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic