Re: compiler optimization

2000-06-08 Thread Chris Abbey
At 23:37 6/7/00 -0400, Joseph Shraibman <[EMAIL PROTECTED]> wrote: >Sez who? Maybe your jre happens to run that way, but IIRC the behavior >is undefined. If I wasn't so lazy I would look it up. sez the JLS, section 4.5.5. Yes I have it infront of me. No it's not there because of this thread. And

Re: compiler optimization

2000-06-07 Thread Mo DeJong
On Wed, 7 Jun 2000, David Blankley wrote: > I went on an interview last week and was thrown this question: ... I tested out your example with the jikes java compiler and it produced two class files that were not the same size. public class B1 { public boolean b; } public class B2 { publi

Re: compiler optimization

2000-06-07 Thread Joseph Shraibman
David Blankley wrote: > > I went on an interview last week and was thrown this question: > > what is wrong/sub-optimal with the following code: > > public class someClass { > /* > * some methods, etc > */ > public boolean myBool = false; > } > > Of course, since booleans default to false, Sez

compiler optimization

2000-06-07 Thread David Blankley
I went on an interview last week and was thrown this question: what is wrong/sub-optimal with the following code: public class someClass { /* * some methods, etc */ public boolean myBool = false; } Of course, since booleans default to false, it would be "better" to code as: public boolean myBoo