In the time of king Nebuchadnezzar in Babylon, God gave certain Hebrew men a gift of knowledge. It was not something they learned in school or that someone taught them, I believe, but a supernatural gift of the Holy Spirit.
Daniel 1:17 KJV |As for these four children, God gave them knowledge and skill in all learning and wisdom: and Daniel had understanding in all visions and dreams.
From
Another Brick in the Wall, Part 2 by Pink Floyd:
http://filsofia.com/share/20250926-education-from-man-not-needed.mp3
And how did Daniel know the king's dream? He didn't go to school to receive that revelation.
Daniel 2:19 KJV |Then was the secret revealed unto Daniel in a night vision. Then Daniel blessed the God of heaven.
God taught Daniel secret things.