Home > Miscellaneous > Easter Egg in Java Class

Easter Egg in Java Class

In my post today, i’m sure all of you already know what is Java, maybe you know it better than me. But, have you already known about Easter Egg in Java ?  Well, this Easter Egg is easy to read. Just prepared all of these things:

  1. A .class file from Java compilation.
  2. Any Hex Editor, in this example im using HEX-ED, a freeware Hex Editor from http://www.nielshorn.net/prog/old/hexed/

Well, if you already have these, lets started with open your .class file with Hex Editor and see the first four bytes, it will show you the word CA FE BA BE.  Why and what is CA FE BA BE ? really, i have no idea, but presumably they had to pick something as their magic word to identify class files, and there’s a limit to how many Java or coffee related words you can come up with using just the letters A-F 🙂

Well, thats all for today guys, hope i can post more in a few days.

Categories: Miscellaneous
  1. No comments yet.
  1. 15 December 2010 at 10:50

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: