it checks if the array needs more slots , if it does it adds 5 more slots to the original array while keeping the same content and order of the array

how could u do this in a method that returns true
and recieves add number to put in the array.?

public boolean add(int theNum)
return true


Well, I know how I would do it. The real question is how you think it should be done. We are not a homework service. Post your attempt at it here and we will help you correct it. We are not, however, going to do it for you.