Java Data Structures I know how to construct the Node class

Java Data Structures

I know how to construct the Node class but still having trouble with the Linked List. I\'m assuming it is called a Linked List, keyword being List. Do I import from java.util.* for the list/array list? Which one do I use: List or ArrayList? If I am importing one of those types of lists, do I add the LinkedList nodes to the list while having having references to link each other?

Solution

The java.util.* packages provide support for the event model, collections framework, date and time facilities, and contain various utility classes. The java.util.zip and java.util.jar packages provide support for ZIP file format and Java Archive (JAR) file formats respectively, and the java.util.prefs package implements the Preferences API.

You need to only import java.util.* because it contains the all interfaces and classes.

Consider the below code for LinkedList:

Java Data Structures I know how to construct the Node class but still having trouble with the Linked List. I\'m assuming it is called a Linked List, keyword bei

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site