Joseph had been taken to Egypt. Potiphar, one of Pharaoh’s Egyptian officials and captain of the guard, bought him from the Ishmaelites who had taken him there.
God gave these four men knowledge, wisdom, and the ability to understand all kinds of literature. Daniel could also understand all kinds of visions and dreams.