At 09:08 9/8/00 -0400, Jacob Nikom wrote:
>I would like to thank all people in discussion, especially Chris.
your welcome. :)
>I had never looked at bytecodes before. As far as I see the
>call to the String constructor is in the line 3.
the bytecode at offset 3:
3 new #11 <Class java.lang.String>
is an instance of the "new" bytecode which creates a
new reference on the stack, it is NOT equivalent to the
java keyword of the same name. Check out the VM Spec for
details. For comparison, the bytecode at offset 9:
9 invokespecial #18 <Method java.lang.String(java.lang.String)>
*is* a call to a constructor... specifically the ctor for Sting,
that takes a string - which was pushed onto the stack by the byte
code at offset 7.
>It is interesting to know how different bytecodes could be in
>different compilers.
even in the "same" compiler there can be WORLDs of difference...
compare the output of javac in 1.1.x and 1.2 against that in 1.3;
the difference is non-trivial.
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]