posted 20 years ago
Yikes! What a lot of questions, Pradeep.
Let me take a few minutes to give my thoughts.
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.
Cheers!
Peter
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>