Question: Method get ( int i ) : it return the element at position i if there is an element; otherwise, it return null. 9 .

Method get(int i): it return the element at position i if there is an element; otherwise, it return null.
9. Method display(): Void method that prints the elements currently in the list. A
10. Method contains(E e): it returns true if the element in the list, otherwise it returns false.
11. Method indexOf(E e): it returns the index of the element e in the list, otherwise it returns -1.
12. Create Test class with main() method, and create two objects of MyList, each one initially
contains 3 elements: one of type Integer and the other one of type Character.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!