--- "Peter B. West" <[EMAIL PROTECTED]> wrote: [Finn Bock] > > > > You should perhaps also be aware that the values > in a static array gets > > assigned to the array one element at a time. So > > > > static int[] a = { > 101,102,103,104,105,106,107,108 }; > > > > becomes in bytecodes: > > > > Method static {} > > 0 bipush 8 > > 2 newarray int > > 4 dup > > 5 iconst_0 ....
Hmmm...Are you saying that declaring a static array isn't much (any?) faster than manually creating one? I didn't realize that there is code being run for static arrays--I would have thought the compiled bytecode just includes the array internally, and not the code to create it. (i.e., if you opened the bytecode you would see an array 101 102 103 104... sitting someplace.) Isn't that how C works, at least? Sigh...I guess I *didn't* know bytecode by heart after all! ;-) Glen __________________________________ Do you Yahoo!? Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes http://hotjobs.sweepstakes.yahoo.com/signingbonus