When the Philistines heard that David had been anointed king of Israel, the whole Philistine army came out to capture him, but David found out and went inside the stronghold.