So, if the length is zero, it means it has no elements so, we return zero to the main method else, we return the last element i.e., a[length-1].
確定! 回上一頁