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 8945521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T12:15:58+00:00 2026-06-15T12:15:58+00:00

Possible Duplicate: Type List vs type ArrayList in Java Hi I have been asked

  • 0

Possible Duplicate:
Type List vs type ArrayList in Java

Hi I have been asked the following question in an interview:

Which of the following would you choose recommended when and where?

ArrayList<SomeType> a = new ArrayList<SomeType>(); or
List<SomeType> a = new ArrayList<SomeType>();

I dont know much difference if anyone knows kindly please help. Thanks in advance.

  • 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-06-15T12:15:59+00:00Added an answer on June 15, 2026 at 12:15 pm

    Second is better cause you can simply change underlying implementation from ArrayList to LinkedList (or to any proper implementation) by one line code change.

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

Sidebar

Related Questions

Possible Duplicate: Type List vs type ArrayList in Java Why is it recommended to
Possible Duplicate: Get generic type of java.util.List I have a Map and I want
Possible Duplicate: c++ virtual function return type I have a simple but confusing question
Possible Duplicate: Assignment from incompatible pointer type warning I have two structures, one which
Possible Duplicate: Adding enum type to a list I have an enum class: public
Possible Duplicate: What is Type<Type> called? What does List<?> mean in java generics? package
Possible Duplicate: List versus ArrayList variable type? I'm intialising a HashSet like so in
Possible Duplicate: List versus ArrayList as reference type? I read somewhere in StackOverflow that
Possible Duplicate: Why is List<Number> not a sub-type of List<Object>? Isn't String a subtype
Possible Duplicate: LINQ to SQL: Return anonymous type? I have a standard LINQ 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.