When you go into a public restaurant do you still pray before you eat, or are you afraid of the mockery you might face? When you have non-Christian friends coming over for dinner do you pray before eating or do you only do that with your Christian friends? When you are behind closed doors do you worship the one and true God or do you only do that at church? These are some examples of how we might interchange what we are doing because we have formed our behaviors around society. Integrity is doing the right thing no matter what the consequences! Daniel was among the first batch of Hebrews that were deported from Jerusalem. They were taken into Babylon to be 'brainwashed' for 3 years in the Babylonian culture and language education. Before being taken to Babylon, I personally believe that he must have been raised as one with a deep love for God, for he had a remarkable wisdom for such a young age.
Daniel first showed his integrity as a covenant-faithful person when he declined a portion from the king's kitchen as their regular meal. This event was recorded in the first chapter of Daniel. Daniel and his company, namely Hananiah, Mishael, and Azariah stated that they were forbidden to eat what was brought to them. This they did so because of their covenant with God. Even though they were in a foreign land, serving a foreign pagan king, they did not forget that it was their nation's failure to maintain the covenant that had brought them to Babylon as captives of war. This is the reason why they needed to show how they were different from the rest of the group. They simply did not compromise (unlike the rest of the captives from Jerusalem), and continued to consecrate themselves to the One and Only God.
Daniel and his company were intelligent and behaved tactfully. They handled the issue of avoiding unwholesome food shrewdly by proving their point to the head attendant rather than choosing to defile their bodies.