This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes Linked List Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Linked List" Watch "Linked List" New topic
Author

Linked List

Arjunkumar Shastry
Ranch Hand

Joined: Feb 28, 2005
Posts: 986
In C,suppose we want to initialize the Linked List in one function and print it in another function,we just pass the pointer to it to a fuction who prints it,thats we pass head of the linked list.
In Java,how to achieve that,there is a class LinkedList and we can do all list operations mentioned.But in scenario like above,should the entire linked list to be passed as there are no explicit pointer?
Or passing linked list in java means internally,passing the pointer,thats head?


Namma Suvarna Karnataka
Arjunkumar Shastry
Ranch Hand

Joined: Feb 28, 2005
Posts: 986
I forgot: Objects are passed as references in java.
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8904

Originally posted by Arjunkumar Shastry:
I forgot: Objects are passed as references in java.




Groovy
 
Consider Paul's rocket mass heater.
 
subject: Linked List
 
Similar Threads
Implement linked list in java
Reverse a Singly linked list in java
Collections API
Weird thing happening in Linked Lists
delete in a singly linked list