141k views
3 votes
Identify the edge case(s) for the below method according to the information provided in class: public void removeLast() {... }

1 Answer

4 votes

Answer:

Where array size is 0

Step-by-step explanation:

Edge cases are cases where values that require specific handling need to be addressed in the program. For example, in the removeLast function which would typically be removing the last element from an array of elements, one edge case would be where the array elements are 0. You cannot remove an array element from an empty array. Another edge case would be a value that does not exist in the array.

User Johannes Gerer
by
6.1k points