Originally posted by Ernest Friedman-Hill:
When you say "new JavaRanch()", the compiler generates bytecodes like
In other words, an uninitialized block of memory is created, and then the constructor (which is actually compiled into a void function named "<init>"!) is invoked to initialize it.
I'm not sure what that means. I know that Java gets compiled to bytecode, but how does examining the bytecode help to understand how constructors work? And what do "new #2", "dup", and "invokespecial #12;" mean?
IBM 286, SCJP, SCWCD, EIEIO