Instead Daniel did what was right for him according to his faith towards God and his memories of the word of God. And fled from the temptation so it could not overcome him. Daniel was an example to his three friends. The strength to follow through on his committment gave a lasting example for his friends to follow. Daniel did not cave in to peer or crowd or society pressure, but instead he gave them an example to follow.
Scripture says to flee from temptation.
It is honorable to leave the area of temptation. Let us remember the warning of scripture to flee from the people or place where you are being tempted. When you realize God's word instructs you to flee temptation, then you can have faith toward God to leave the scene. You can realize that leaving the scene is God's way for you to not be overcome. That if a young man or woman fails to leave the scene, to flee temptation, then they are falling short of God's pattern for deliverance.