I'm new to java.
I have been trying to do something without success.
Basically What I want to do is to create a method that return true or false. The method gets some parameter, checks if a certain array is full, if not it pushes the parameters to the to the first cell that isn't empty, return true and NOT keep checking for the rest of the array.
If the array is full it just return false.
This is the code:

```
public boolean add( param1, param2, param3 ){
 for( int i = 0; i < array.length; i++ ){
   if ( array[i] == null ){
     array[i] =  new SomeObject( param1, param2, param3 ); 
     return true;
     break;
     }
  }
  return false;
}

```

But I get error- "unreachable statement" for "break;".
Any help?

Thanks in advance!