Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Beginning Java and the fly likes Why is it not cafebabe ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Why is it not cafebabe ?" Watch "Why is it not cafebabe ?" New topic

Why is it not cafebabe ?

Pho Tek
Ranch Hand

Joined: Nov 05, 2000
Posts: 782

It was mentioned that the hex bit patterns of the initial parts of java classes translate to cafebabe. When I did a hexdump recently, it gave me:

Why ?
Dragan Stankovic
Ranch Hand

Joined: Oct 14, 2008
Posts: 33
If you coded in machine language you would know

So your dump actually looks like this (it is byte oriented):

Usually, when you do hex dump the memory is displayed in blocks of 16 bits or two bytes where byte with higher bits is displayed first so it seems as they have reversed order.
[ November 10, 2008: Message edited by: Dragan Stankovic ]
Bill Shirley
Ranch Hand

Joined: Nov 08, 2007
Posts: 457
Time for some Computer Science 101: Endianness.

Bill Shirley - bshirley -
if (Posts < 30) JavaRanchFAQ);
I agree. Here's the link:
subject: Why is it not cafebabe ?
It's not a secret anymore!