All pastes #761481 Raw Edit

Someone

public java v1 · immutable
·published 2007-11-04 22:10 UTC
rendered paste body
//Since java doesn't have array.hasValue, i'll make a method for it myself.    //Hooray for java. -__-    //Method to return true if an array contains item.    public boolean hasValue(String table[], String item) {    	int length = table.getLength();    	for ( int i=0; i<length; i++ ) {    		if (table[i].equals(item)) {    			//Found the item in the table.    			return true;    		}    	}    	//The loop never found any matches, return false.    	return false;    }