This from Patrick Naughton, one of the original members of the team that eventually produced Java:

Strangely enough the magic number for .class files was chosen long before the name Java was ever uttered in reference to this language. We were looking for something fun, unique and easy to remember. 0xcafebabe was better than the second runner-up, 0xdeadbabe. :-)

It is only a coincidence that the oblique reference to the cute baristas at Peet's Coffee was foreshadowing for the name Java.