Java does not have the concept of pointers . So how does java implement the implicitly available linkedList or even make a shallow copy for that matter ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
Java does have references that can point to another object, or null. That is all that is needed for a linked list.
You do the general purpose linked list in C by having a struct for node, likewise, the LinkedList would in Java contain also a private class for a node with reference to the actual value, and 1 or more references to the node class for links.