score:4
No one could know for sure what David knew or was thinking when he wrote, for example, Psalms 22 (one of my favorite) which can clearly be taken as entirely prophetic of Christ, but also refects David's own personal experiences. Jesus quoted (part of) verse one from the cross, "My God, my God, why hast thou forsaken me?", and the soldiers fulfilled verse 18, "They parted my garments..." (having no idea that they were doing so) indicating that it was indeed prophetic.
Ps 49:15 "But God will redeem my soul from the power of the grave: for he will recieve me" shows a little that David did know for sure, and trust in, and again it was Jesus who redeemed David's soul.
Saul also prophesied in I Sam 10:11-12 and in 1 Sam 19:24, and in Num 22 God even opened the mouth of a donkey! 2 Pet 2:16
One thought is that David's own experiences as a rejected king for so many years allowed him to experience some of the same emotions and feelings that Jesus would eventually feel, giving him a personal insight into the Christ that hadn't come yet.
Upvote:2
I believe David would have been experienced enough to know when he is under the Spirit of inspiration. However, I'm not aware of any verse of him stating this directly, but then again, neither do most of God's prophet and apostles.
However, it is not just Christians who quote David as prophetically applicable towards Jesus.
Jesus did so Himself and even described David as being in the Spirit.
Matthew 22:
43 He said to them, “How then does David in the Spirit call Him ‘Lord,’ saying:
44 ‘The Lord said to my Lord, “Sit at My right hand, Till I make Your enemies Your footstool”’?[Psalm 110:1]
45 If David then calls Him ‘Lord,’ how is He his Son?” 46 And no one was able to answer Him a word, nor from that day on did anyone dare question Him anymore.