And David reigned over all Israel; and David executed judgment and justice unto all his people. 2 Samuel 8:15. RC 334.1
A few miles south of Jerusalem, “the city of the great King,” is Bethlehem, where David, the son of Jesse, was born more than a thousand years before the infant Jesus was cradled in the manger and worshiped by the Wise Men from the East. Centuries before the advent of the Saviour, David, in the freshness of boyhood, kept watch of his flocks as they grazed on the hills surrounding Bethlehem. The simple shepherd boy sang the songs of his own composing, and the music of his harp made a sweet accompaniment to the melody of his fresh young voice. The Lord had chosen David, and was preparing him, in his solitary life with his flocks, for the work He designed to commit to his trust in afteryears.—Patriarchs and Prophets, 637. RC 334.2
David in his youth was intimately associated with Saul, and his stay at court and his connection with the king's household gave him an insight into the cares and sorrows and perplexities concealed by the glitter and pomp of royalty. He saw of how little worth is human glory to bring peace to the soul. And it was with relief and gladness that he returned from the king's court to the sheepfolds and the flocks. RC 334.3
When by the jealousy of Saul driven a fugitive into the wilderness, David, cut off from human support, leaned more heavily upon God. The uncertainty and unrest of the wilderness life, its unceasing peril, its necessity for frequent flight, the character of the men who gathered to him there—“every one that was in distress, and every one that was in debt, and everyone that was discontented” (1 Samuel 22:2)—all rendered the more essential a stern self-discipline. RC 334.4
These experiences aroused and developed power to deal with men, sympathy for the oppressed, and hatred of injustice. Through years of waiting and peril, David learned to find in God his comfort, his support, his life. He learned that only by God's power could he come to the throne; only in His wisdom could he rule wisely. It was through the training in the school of hardship and sorrow that David was able to make the record—though afterward marred with his great sin—that he “executed judgment and justice unto all his people.”—Education, 152. RC 334.5
The love that moved him, the sorrows that beset him, the triumphs that attended him, were all themes for his active thought; and as he beheld the love of God in all the providences of his life, his heart throbbed with more fervent adoration and gratitude, his voice rang out in a richer melody, his harp was swept with more exultant joy; and the shepherd boy proceeded from strength to strength, from knowledge to knowledge; for the Spirit of the Lord was upon him.—Patriarchs and Prophets, 642. RC 334.6