linear search with recursion in java