Answer:
The complete method is as follows:
public List buildList(List L)
{
L.insert(30);
L.insert(23);
L.insert(19);
L.insert(4);
return L;
}
Explanation:
To complete the method, we make use of the insert() function.
This inserts elements of the list into list L. However, we have to start from the last element (i.e. in descending order)
So, the explanation is as follows:
L.insert(30); --- This inserts the last element
Continue inserting in descending order
<em> L.insert(23); </em>
<em> L.insert(19);
</em>
Until the first list element is inserted
L.insert(4);
This returns the filled list L
return L;