Question: undefined Write a generic method called delete() that receives a generic type array, and the index of the element to be deleted. The method deletes

undefined

Write a generic method called delete() that receives a generic type array, and the index of the element to be deleted. The method deletes elements in the passed index. If the index is out of range, then an exception needs to be thrown.

Example:

Input array: j,g,e,k,y,k,g , and index passed is 3. Then if you tried to print the array after calling the method, you will get j,g,e,y,k,g,null.

For submission instructions:

In a word file submit the class you created including the method in the question, and the main method where you tested the method.

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 Databases Questions!