Solomon was the wisest man who ever lived (next to Jesus). Solomon was able to know something without having to learn it beforehand.