You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This may be a small thing, still it made me confused for sometime.
Section : Exercise 2
In the file MyArrayList.java, stubs are given for four methods as listed below.
However in the text book, it has asked to implement only three methods, skipping add method.
There is no specific instruction given in the book, what to do with the stub given for add method.
Obviously everyone can assume that this has also to be implemented, for that purpose the code is
also given in the book. Therefore it is a matter of copy and paste, I did so.
Still it confused a bit while reading the book. The similar point is applicable to the file MyLinkedList.java as well.
public boolean add(T element) {}
public int indexOf(Object target) {}
public T remove(int index) {}
public T set(int index, T element) {}
MyLinkedList.java
public void add(int index, E element) {}
public int indexOf(Object target) {}
public E remove(int index) {}
public List subList(int fromIndex, int toIndex) {}
Franklin
The text was updated successfully, but these errors were encountered:
Hi,
This may be a small thing, still it made me confused for sometime.
Section : Exercise 2
In the file MyArrayList.java, stubs are given for four methods as listed below.
However in the text book, it has asked to implement only three methods, skipping add method.
There is no specific instruction given in the book, what to do with the stub given for add method.
Obviously everyone can assume that this has also to be implemented, for that purpose the code is
also given in the book. Therefore it is a matter of copy and paste, I did so.
Still it confused a bit while reading the book. The similar point is applicable to the file MyLinkedList.java as well.
public boolean add(T element) {}
public int indexOf(Object target) {}
public T remove(int index) {}
public T set(int index, T element) {}
MyLinkedList.java
public void add(int index, E element) {}
public int indexOf(Object target) {}
public E remove(int index) {}
public List subList(int fromIndex, int toIndex) {}
Franklin
The text was updated successfully, but these errors were encountered: