hello I am having difficulty writing this code, I am lost on the last two methods. This is a learning exercise (not homework), but I need examples to learn.
Plus I thought this would be useful in the stackoverflow database as well.

```
public class NumberList {

public int[] values;  

public NumberList() {
    values = new int[0];
}

public NumberList(int[] a) {
values = new int [a.length];
for (int i=0;i<a.length;i++)
values[i] = a[i];
}

public int getSize() {
    return this.values.length;

}

public int getAt(int index) {
    if (index>=values.length){
        throw new IndexOutOfBoundsException ("Values of out of bounds");
    }else{
        return values[index];
    }
}

public long getTotal() {
    long sum = 0;
      for (int i=0; i<values.length; i++) {
        sum = sum + values[i];
      }
      return sum;

}
// need help here its a boolean that the number is in the array but if not its //false
public boolean contains(int number) {

     for (int i=0; i<values.length; i++){ 
        if (number <values.length+1){ 
            return true;

     }
     //else 
        // return false;
    // }

// this is an add method that confuses me and ask myself why since i added without it.
public void add(int number) {
     number=0;

}

}

```