First, YES! Just Java 6th Edition has full coverage of the Tiger features, J2SE 5! As a matter of fact, when I was researching the book, I got interested in how, and how much Java had changed over the 6 major release it has had, and I put together a chart to help me understand it. Then I thought that readers might be interested in that information too, so I put it into JJ6, in the Preface to be precise.
Second, static import - as you point out, it was not strictly necessary, you could go on using the long form of static names. Or the language rules could even be changed to allow the effect of static import without the "static" keyword.
I had a long discussion with the compiler-writer at Sun responsible for the design choices in this case. He was of the view that the best tradeoff was to help programmers see which names are static members of a class. I have got a lengthy discussion of this on page 126 of Just Java 6th Ed, if you have a copy handy. So agree with it or not, that is the reasoning.
I'll come back to the question of enhanced for loop as it raises some interesting issues.
Author of <a href="http://www.amazon.com/exec/obidos/ASIN/0131482114/ref=jranch-20" target="_blank" rel="nofollow">Just Java(TM) 2 (6th Edition)</a>
Since there are a lot of arguments about this static import feature in Tiger, do u think that they will consider eliminating this feature in the next release of J2SE 5.1 or sthing? Or is it just a small weak point of Tiger that we can ignore it? :roll:
Pradeep, me and Nick, discussed about it one time, when we were in the last book promotion about Mr.Herb's Tiger book... I can still remember it... It's good that we can get opinions from great authors like this...
Thanks the Ranch for such a great opportunity, which we cannot get elsewhere...
Co-author of SCMAD Exam Guide, Author of JMADPlus SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
quote: I also have a question regarding Autoboxing. It reduces the code but comes with a performance price. Dont you think that we should avoid using it. ===========================================================================