"Now David became aware that Saul had come out to seek his life while David was in the wilderness of Ziph at Horesh. And Jonathan, Saul’s son,
arose and went to David at Horesh, and encouraged him in God."
1 Samuel 23:15-16
During what was the lowest point of David's life, when Saul was determined to kill him, Jonathan went to David to "encourage him in God". Jonathan pointed David to the Lord. He reminded David of God's promises and faithfulness. That's what friends do for their friend who is in distress. They encourage him to place his confidence in God, not in himself. Jonathan's encouragement was especially significant because he had the most to lose if David lived. God had promised David that he would be king, which meant that Jonathan who was next in line to replace his father Saul as king would lose out. "As a pious friend, [Jonathan] directed him to God, the foundation of his confidence and the fountain of his comfort: He strengthened his hand in God. David, though a strong believer, needed the help of his friends for the perfecting of what was lacking in his faith; and herein Jonathan was helpful to him, by reminding him of the promise of God, the holy oil wherewith he was anointed, the presence of God with him hitherto, and the many experiences he had had of God's goodness to him. Thus he strengthened his hands for action, by encouraging his heart, not in the creature, but in God. Jonathan was not in a capacity of doing any thing to strengthen him, but he assured him God would." (Matthew Henry)