I have been young, and now am old; yet I have not seen the righteous forsaken, nor his descendants begging bread.
King David had seen a lot in His life, including hardships and many trials. But as he looked back on it all, he concluded that in his experience, the righteous had not been forsaken and their children had not needed to beg for bread.
David knew that God has the power to take care of those who are striving to do right and their families. He trusted in God and His promises.