2 Samuel 5:14
ESV
And these are the names of those who were born to him in Jerusalem: Shammua, Shobab, Nathan, Solomon,
NIV
These are the names of the children born to him there: Shammua, Shobab, Nathan, Solomon,
NASB
Now these are the names of those who were born to him in Jerusalem: Shammua, Shobab, Nathan, Solomon,
CSB
These are the names of those born to him in Jerusalem: Shammua, Shobab, Nathan, Solomon,
NLT
These are the names of David’s sons who were born in Jerusalem: Shammua, Shobab, Nathan, Solomon,
KJV
And these be the names of those that were born unto him in Jerusalem; Shammua, and Shobab, and Nathan, and Solomon,
NKJV
Now these are the names of those who were born to him in Jerusalem: Shammua, Shobab, Nathan, Solomon,
What does 2 Samuel 5:14 mean?
Second Samuel 3:2–5 identifies the six sons David's six wives gave birth to in Hebron, when he was king of Judah. Second Samuel 5:14–16 and 1 Chronicles 3:5–8 and 14:4–7 list the rest of his sons who were born in Jerusalem, when he was king of all Israel. Some of the names are slightly different, and the passages in 1 Chronicles include more names; it's possible two of the boys died when they were very young. The lists only include the sons of David's wives, not his many concubines.First Chronicles 14:4 is the parallel passage to this verse. First Chronicles 3:5 is part of a more detailed list and identifies all four as the sons of "Bath-shua, the daughter of Ammiel." These four are Bathsheba's sons.
"Shammua" means one who listens or harkens to God. Shimea, "something heard," is an alternate spelling (1 Chronicles 3:5). David also has a brother named Shammah (1 Samuel 16:9), sometimes spelled Shimeah (2 Samuel 13:3) or Shimea (1 Chronicles 2:13).
"Shobab" means to return, either to be restored or to backslide.
"Nathan" means given of God. Nathan is Mary's ancestor (Luke 3:31). He may be named after David's prophet-advisor (2 Samuel 7:2–3).
The name "Solomon" is related to shalom which means peace or wholeness. We don't know why he was given this name. David may have been relieved that peace between him and God was restored after his sin against Bathsheba and Uriah. Solomon did have a peaceful reign.
Solomon is last in all three lists of Bathsheba's sons. Second Samuel 12:24–25 seems to say he is the first son of David and Bathsheba to live. The names are probably not in order. It's common in biblical genealogies to cover the minor characters first before concentrating on the more important figures. See how Cain's descendants' stories come before Seth's (Genesis 4—5), and Japheth and Ham are covered before Shem (Genesis 10).