Is there some way of taking advantage of code reuse in this example? I am implementing a set, using an array as the backend.

Here is how I declared it (and some method implementations):

public class Set {
            private int[] elementData;
            private int size;
               ....
          public void remove(int value) {
             for(int count = 0; count &lt; size; count ++) {
                    if(elementData[count] == value) {
                        elementData[count] = elementData[size - 1];
                        size --;
                        break;
                    } 
              }
           }
          public boolean contains(int value) {
             for(int count = 0; count &lt; size; count ++) {
                 if(elementData[count] == value) {
                    return true;
                 }
            }
            return false;   
        }
   }


I tested these methods with the JUnit testing framework and they both ran fine and worked. However I am trying to improve code reuse because I see the same iteration and a test condition in both methods, that is 

for(int count = 0; count &lt; size; count ++) {
            if(elementData[count] == value) {


But both methods perform different operations if they make it into a conditional block, one returns while the other moves elements and then breaks. Is there a way to reduce code redundancy here or is that not necessary?
You can absolutely refine the code to reuse the for loop. You can put the for loop in a function, which take the int value as input and return the index of value. Let's call it "iteration". If not found the value in elementData, just return -1 instead.       

public int getIndex(int value) { 
    for(int count = 0; count &lt; size; count ++) {
        if(elementData[count] == value) {
            return count;
        }
    } 
    return -1;
}


In your remove function, if you get -1 as the return value of the "iteration" function, do nothing. If you get a positive value, remove elementData[index]. Similar in the contains function.