After one minute man 3 yells out that he is wearing a black hat.  The firing squad lowers their weapons and releases the men.  The others obviously are relieved and thankful, but curious as to how he was so certain.  He calmly replies that deduction was the key.  Man 3 deduced the following:

1.  They all knew that there were two black hats and two white hats.
2.  Man 4 could see man 2 and man 3.
3.  If man 4 had seen man 2 and man 3 wearing the same color hats,  he would have known for certain that he was wearing the other color and called out.
4.  Since he did not yell out, it was obvious that man 2 and man 3 were wearing different color hats.
5.  Since man 3 could see that man 2 wore a white hat, he knew that he was wearing a black hat.