What I suggest you do instead of having all those ifs and loops inside the add method, refactor some of the code out to other methods. For example write a method that determines at what index the new value should be added. Write a method that moves all the values from x to theSize - 1 back a slot. If you do this then all your add method does is:
else if(contains(x) == false) {
call method to find index to insert at
use above index to call method to move elements
insert new value at index
increase theSize
return true
}
return false
By the way in your if condition use the not operator and not == false.