1. Engineering
  2. Computer Science
  3. please complete the following in java class for...

Question: please complete the following in java class for...

Question details

Please complete the following in Java:

/**
* Class for representing a linked list of ints.
*/
public class List {
public int value;
public List next;

public List() { }

public List(final int setValue) {
value = setValue;
}

/**
* Add a value as the last item in the list.
*
* Can be called on any item of the list, although will normally be called
* on the first item.
*/
public void addToEnd(final int newValue) {
return;
}
}

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution