Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

puzzler authors question

 
Chris Wash
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I was in school, we used jasmin a lot to explore how the JVM behaved and class files were structured. We ran into a number of unexpected behaviors that didn't make sense until you understood how the bytecode got to be the way it was, and then how it was being interpreted.

Did you run across any puzzlers that no good explanation outside of "that's how it gets compiled/interpreted"? If so, are the implications for these types of puzzlers more profound after writing this book than you considered them to be beforehand?

Thanks -- look forward to checking out the book,

Chris

PS - I saw you worked for Google -- do they put Ajax in the cafeteria food there? =]
 
Neal Gafter
javac author
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is one puzzle in the book whose behavior is so counterintuitive that we dive into the bytecode to understand what's going on. It is Puzzle 44, "Cutting Class". It originated as a bug report at Sun, and it took years before the issue was understood and the bug report closed (as "not a bug").
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic