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

  • SEARCH
  • Home
  • 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 8995221
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:35:27+00:00 2026-06-15T23:35:27+00:00

In Java, I have been asked to store integer values in a singly-linked list

  • 0

In Java, I have been asked to store integer values in a singly-linked list and then print the elements stored in the list. Here is what I came up with:

int max = 10;
List<Integer> list = new ArrayList<Integer>();

for (int num = 0; i < max; i++){
     list.add(num);
}
System.out.print(list);

I was wondering, is ArrayList the same thing as a singly-linked list? I want to make sure that I’m answering the question correctly. Does this make sense? Thanks!

  • 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-15T23:35:28+00:00Added an answer on June 15, 2026 at 11:35 pm

    No – ArrayList is not a linked list at all – it’s an array list. ArrayList stores its elements in an array, whereas linked lists store them in arbitrary memory by linking objects together.

    LinkedList is a doubly-linked list, and I’m sure that there are various singly linked list implementations you could grab, but given that this is an assignment you’ll either be marked down or fail outright if you try to hand in code using someone else’s implementation.

    Instead, find an article etc. which describes linked lists and try to implement one yourself.

    Generally these are built in java by having a class SomeClass containing a forward link of type SomeClass and a value. You build the list by linking each SomeClass instance to the next through the forward link.

    • 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 Hi I have been asked
I have been asked to write a java program on linux platform. According to
I'm new to Java and have been asked to create an applet/servlet (not sure
I've just started Java and we have been asked to produce pong (or a
Variants of this question have been asked several times now here, but my question
We've been asked to implement a Linked Set in java. Below is my attempt,
I realize that similar questions have been asked about this before here on SO,
I'm working on a java project, and now I have been asked to track
We have been asked to implement a Red Black Tree in java, but not
I am learning Java and have been given these options: How can you implement

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.