What is proble with "iterator.next()%2 "?
===

What is problem with my code? I am trying to find whether the set contains any odd number 

    public static boolean hasOdd ( Set<Integer> set) {
    Iterator iterator;
    iterator = set.iterator();
    
    while (iterator.hasNext()){
        if(iterator.next()%2 != 0){
            return true;
            
        }
        
        else
            return false;
    }
}
