King David and Bathsheba had four children, all boys. Their names were Shammua, Shobab, Nathan and Solomon. Their first son died as punishment for David's sin with Bathsheba.
David saw Bathsheba bathing and was impressed by her beauty. Despite learning she was married to Uriah, David slept with her, and she conceived a child. David first tried to arrange things to look like the child belonged to Uriah, but when his efforts failed, he had Uriah killed. The prophet Nathan confronted him about what he had done and told him the child would die as a result. Solomon, another son of David and Bathsheba, succeeded David as king.