Called his name Solomon. — The birth of Solomon could hardly have taken place until after the events mentioned in 2 Samuel 12:26-31, since it is not likely that the siege of Rabbah would have occupied two years. It is without doubt mentioned here (after the custom of Scripture narrative) to close the story of Bath-sheba in its proper connection. The birth of that son who should succeed to the kingdom, and through whom should pass the line to the Messiah, was too important to be overlooked.
Related Commentaries of 2 Samuel 12:24
2 Samuel 12:24
24 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.