Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6136419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:36:04+00:00 2026-05-23T17:36:04+00:00

I think they are very similar…And when do we need to use stack or

  • 0

I think they are very similar…And when do we need to use stack or queue, why not just use ArrayList or LinkedList to replace them?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T17:36:05+00:00Added an answer on May 23, 2026 at 5:36 pm

    Stack, is a Last-In-First-Out stack of objects derived from Vector, also a class. Vector goes with the “old” set of collections that Java originally shipped with, and derives ultimately from AbstractCollection. Of note, there’s really one canonical implementation of a Stack; Queues and Lists have many well known implementations that can make a substantial performance difference when chosen correctly.

    Queue on the other hand follows the Collection interface from the “new” set of collections that are typically used today, so it follows the interfaces and comes with a variety of implementations.

    Stacks should be used when you need LIFO semantics, while Queues should be used when you need First-In-First-Out semantics.

    ArrayList and LinkedList store ordered collections of things, and don’t line up with the use-cases of Stack or Queue directly. Stacks and Queues are in a sense buffers of data, whereas the semantics of a List typically make it such that it’s a store of data; nothing is stopping you from using a List to implement a Stack or a Queue.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Some people don't like sequences on Oracle. Why? I think they are very easy
I'm not sure how to look for this online... I think they might be
This is very similar to a couple of other questions on stackoverflow, but they
Here are two different questions but I think they are related. When using Git,
Assume my objects are in perfect working order (i.e. TDD makes me think they
My boss believes that wizards make things simple for the user. I think they
As C# operators e.g. +, +=, == are overridable. It lets me think they
Can anyone give me a scenario where they think busy cursors are justified? I
I was wondering if anyone had an opinion on what they think is the
Some of the fellows in the office think that when they've added threads to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.