File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes how to do link list in java? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "how to do link list in java?" Watch "how to do link list in java?" New topic

how to do link list in java?

max soyosa

Joined: Feb 25, 2010
Posts: 24
hi to all!
can anyone help me or teach me on how to do linklist in java?

please help!
Vijitha Kumara

Joined: Mar 24, 2008
Posts: 3886

max soyosa wrote:can anyone help me or teach me on how to do linklist in java?

Do you need an existing implementation for LinkedList (infact there's a one with the name itself) in Java or need to implement a one using Java?
And, please CarefullyChooseOneForum when posting. This forum is for questions specific to JDBC.

[How to ask questions] [Twitter]
Devaka Cooray
ExamLab Creator

Joined: Jul 29, 2008
Posts: 3528

Please tell more details on what you are finding for.
Moving to Beginning Java forum.

Author of ExamLab ExamLab - a free SCJP / OCPJP exam simulator
What would SCJP exam questions look like? -- Home -- Twitter -- How to Ask a Question
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 43335
Start with a singly linked list. Each node has a link to the next node, and the last node keeps a null in that reference. You need recursive methods which look for the next node, and each node has a value of some sort attached as its reference.
Vineet Kakati

Joined: May 03, 2010
Posts: 21
create a class Node having instance variables data and p;
the variable data stores data.
the variable p is of type Node which points to another node;

create a linked list by creating objects of class node and link them together by using variable p for each node;
p for last node should be null;
I agree. Here's the link:
subject: how to do link list in java?
jQuery in Action, 3rd edition