God gave knowledge and understanding to those four young men. So they understood all kinds of writings and subjects. And Daniel could understand all kinds of visions and dreams.