[Shacs] Java Triva

Bronius Motekaitis bronius at bcswebstudio.com
Mon Apr 16 09:52:16 CDT 2007


I don't mean to bring this up again (just read it and saw the datestamp of
Apr 7, over a week old), but I hope you two have made up since then..  :O

Another, less discussed fact, is that that of the fifth byte of any Java
code: it always falls in the range of 00-FF.

Ok, I'm potentially revealing a weakness in my practice (not my education,
mind you, just a "man it's been a long time since I dealt in byte-code"),
but isn't a byte = 8bits = 0-F, not 00-FF?  Is this a difference in
architecture that dictates this discrepancy?  If so, could Burris' original
post have said, "Depending on architecture, the first 4 to 8 bytes is.."

-bronius


On 4/7/07, Dr. Tim McGuire <csc_tjm at shsu.edu> wrote:
>
>
> > The first four bytes in the header for Java class files are CA FE BA BE
> > in hexadecimal. There is an interesting connection between the café St.
> > Michael's Alley and the group the Grateful Dead. Note the first four
> > bytes spell "Café Babe." If you need help making the connection, speak
> > to Mr. Boyle.
>
> Glad to see, Dr. B., that you are actually progressing in your feeble
> attempts at making computer science relevant.  First of all, you appropriate
> my void clint_eastwood(void); example.  (Your modifications, unfortunately,
> diminished its value.)  And now you're finally bringing up this example --
> I've had my CS272 students convert the first four bytes of a Java class file
> into hex as an exercise for several years now (supplementing the previous
> exercise of converting 12, 5655, 2550276, 76545336, 3726755 from octal into
> hexadecimal.)
>
> Welcome to the 21st century....  ;)
>
>
> TJM
>
>
> --
> Timothy J. McGuire, Ph.D.
> Department of Computer Science
> Sam Houston State University
> Huntsville, Texas 77341-2090
> mcguire at shsu.edu
> _______________________________________________
> Shacs mailing list
> Shacs at shsu.edu
> http://lists.shsu.edu/mailman/listinfo/shacs
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shsu.edu/pipermail/shacs/attachments/20070416/1e48e880/attachment.html


More information about the Shacs mailing list