2 Samuel 12:24
ESV
Then David comforted his wife, Bathsheba, and went in to her and lay with her, and she bore a son, and he called his name Solomon. And the Lord loved him
NIV
Then David comforted his wife Bathsheba, and he went to her and made love to her. She gave birth to a son, and they named him Solomon. The Lord loved him;
NASB
Then David comforted his wife Bathsheba, and went in to her and slept with her; and she gave birth to a son, and he named him Solomon. Now the Lord loved him,
CSB
Then David comforted his wife Bathsheba; he went to her and slept with her. She gave birth to a son and named him Solomon. The Lord loved him,
NLT
Then David comforted Bathsheba, his wife, and slept with her. She became pregnant and gave birth to a son, and David named him Solomon. The Lord loved the child
KJV
And David comforted Bathsheba his wife, and went in unto her, and lay with her: and she bare a son, and he called his name Solomon: and the Lord loved him.
NKJV
Then David comforted Bathsheba his wife, and went in to her and lay with her. So she bore a son, and he called his name Solomon. Now the Lord loved him,
What does 2 Samuel 12:24 mean?
God forgave David's sin against His Law when he repented. But Uriah and Bathsheba still deserved justice. For Uriah, God cursed David with what he gave Uriah: violence in his home, the humiliation of his wives, and the loss of his son with Bathsheba (2 Samuel 12:10–14).Bathsheba also deserves justice, and she receives it through restoration. David took Bathsheba's loving husband (2 Samuel 11:14–17). David comforts and cares for her. He took away her potential to have children with her husband, and he lost the right to keep the child he had with her because of his sin (2 Samuel 12:15–23). Giving her more children, especially in this culture, is also an act of justice.
Solomon is mentioned most prominently, but the genealogies say Bathsheba also has Shimea, Shobab, and Nathan (1 Chronicles 3:5). Nathan was the ancestor of Mary (Luke 3:31). Solomon was probably the last born.
"Solomon" is a transliteration of the name Shalōmōh, a variation of the Hebrew shalowm. This means peace and wholeness. Today, there's a lot of necessary talk about David's maltreatment of Bathsheba. It's an important topic. It's also important to note that David and Bathsheba came to a reconciled relationship. They grew into peace with each other.
Of course, Solomon isn't just a representation of that relationship. He's also David's heir. Nathan the prophet tells David:
When your days are fulfilled and you lie down with your fathers, I will raise up your offspring after you, who shall come from your body, and I will establish his kingdom. He shall build a house for my name, and I will establish the throne of his kingdom forever. I will be to him a father, and he shall be to me a son.David dishonored Bathsheba by making her a sexual plaything. He restores her honor by making her the mother of the future king.
-–2 Samuel 7:12–14