In 2 Samuel, we are told that Goliath was killed by Elhanan:
19 In another battle with the Philistines at Gob, Elhanan son of Jaare-Oregim the Bethlehemite killed Goliath the Gittite, who had a spear with a shaft like a weaver’s rod. NIV1984
But previously Goliath was killed by David:
50 So David triumphed over the Philistine with a sling and a stone; without a sword in his hand he struck down the Philistine and killed him. NIV1984
How is this possible - is this a contradiction in the Bible?