One day, as David was praying in his prayer niche, he ordered his guards not to allow anyone to interrupt him, but two men managed to enter and disturb him. "Who are you?" he asked. One of the men said: "Do not be frightened. We have a dispute and have come for your judgment." David said: "What is it?" The first man said: "This my brother, has ninety-nine sheep, and I have one. He gave it to me but took it back." David, without hearing from the other party, said: "He did you wrong by taking the sheep back, and many partners oppress one another, except for those who are believers."
The two men vanished like a cloud, and David realized that they were two angels sent to him to teach him a lesson. He should not have passed a judgment without hearing from the opposing party.
Related Quran Ayaaths of this Hadith.
Surah 6 : Ayah 84 Surah 4 : Ayah 163 Surah 11 : Ayah 25 Surah 11 : Ayah 32 Surah 11 : Ayah 36 Surah 17 : Ayah 55 Surah 27 : Ayah 15 Surah 27 : Ayah 16"When a person dies, his works end, except for three: ongoing charity, knowledge that is benefited from, and a righteous child who prays for him."
Prophet Mohammed (PBUH)
"The best of what a man leaves behind are three: a righteous child who supplicates for him, ongoing charity the reward of which reaches him, and knowledge that is acted upon after him."
Sunan Ibn Mājah
"Every day two angels come down from Heaven and one of them says, 'O Allah! Compensate every person who spends in Your Cause,' and the other (angel) says, 'O Allah! Destroy every miser.'"
Sahih Bukhari