linked list - Java Programing Data field "head" -
In the Java class and in the next program, we need to edit a list, though I understand a part of the instructions. Does not come.
Instructions from the homework:
In this there is a data field "head" with the data type of the minoid, which is defined as follows:
public class Minod & lt EE comparative & lt; E & gt; & Gt; {E element; MyNode & LT; E & gt; the upcoming; Public MyNode (e-commodity) {element = item; Next = null; }} It contains a non-logic constructor which is zero to start the head.
I do not understand what my instructor means "head"? Does he mention the list as "head"? Any ideas will help thank you.
This looks like the implementation of a linked list where each item (or node) has a next item (Or node) is often referred to as the first item 'head' in a linked list.
The instructions are asking you to write a class that contains a variable type MyNode head . Something like this:
Public class MyAnswer {Private MyNode head; Public MyAnswer () {Head = Null; }}
Comments
Post a Comment