wood burning stoves 2.0*
The moose likes Java in General and the fly likes Welcome Herbert Schildt! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Welcome Herbert Schildt!" Watch "Welcome Herbert Schildt!" New topic
Author

Welcome Herbert Schildt!

Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
This week, we're delighted to have Herbert Schildt amongst us, helping to answer questions in the Java in General (intermediate) forum.

We'll be selecting four random posters in this forum to win a free copy of his book, Java: The Complete Reference, J2SE 5, provided by the publisher, McGraw-Hill Osborne Media.

Welcome Herbert!

For more information on this and future book promotions, visit http://www.javaranch.com/bookpromo.jsp


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Horatio Westock
Ranch Hand

Joined: Feb 23, 2005
Posts: 221
Hello Herbert!

I've been meaning to get more into 5, so I'm sure the discussions over the next week will be interesting.
Steve Morrow
Ranch Hand

Joined: May 22, 2003
Posts: 657

Likewise. I've been using some of the new features, but I'm interested to learn more about it, particularly annotations. I assume annotations are covered in the text...
Mauricio Villada
Greenhorn

Joined: Nov 20, 2003
Posts: 1
Probably this is a dumb question but shouldn't this new version be referred to as J5SE, after all, this is supposed to be another 'major' change to the platform.
Herb Schildt
Author
Ranch Hand

Joined: Oct 01, 2003
Posts: 239
Hi!

Its great to be back at JavaRanch again!

Here is something to get us started: J2SE 5 has changed the way that we will program for Java. Its a big change and most programmers still don't understand its significance.

Thoughts?


For my latest books on Java, including my Java Programming Cookbook, see HerbSchildt.com
Axel Janssen
Ranch Hand

Joined: Jan 08, 2001
Posts: 2164
Originally posted by Mauricio Villada:
Probably this is a dumb question but shouldn't this new version be referred to as J5SE, after all, this is supposed to be another 'major' change to the platform.

Difficult to spell, isn't it Tji-five-es-e
I prefer name Java5_or_Java1.5_or_tiger_in_the_end_it_doesn't_matter.
Herb Schildt
Author
Ranch Hand

Joined: Oct 01, 2003
Posts: 239
Here is what Sun says about version naming.

In J2SE 5, the acronym J2SE stands for "Java 2 Platform, Standard Edition". The 5 is Sun's version number. Furthermore, the 2 in J2SE refers to "second generation".

As a point of interest, Sun still uses 1.5 for its internal version number.
[ March 15, 2005: Message edited by: Herb Schildt ]
Jeff Langr
author
Ranch Hand

Joined: May 14, 2003
Posts: 762
Thoughts:

- J2SE 5.0 will change the way many of us code. It's already cleaned up my code considerably.
- The changes in J2SE 5.0 will be ignored by many.
- It won't be used by most of us for quite some time, unfortunately.
- When it does start appearing, we'll see more hybrid solutions. Code that uses Enumeration, Iterator, and the new for-each loop. Code that uses a mixture of casts and parameterized types. Code that uses combinations of enum constants, hard-coded psf constants, and hand-coded Bloch-safe object constants. Code that uses old and new ways of locking/synchronizing on objects. Code that doesn't use EnumMap when it should. Etc.

I have two disappointments with 5.0:
1. erasure
2. backward compatibility, which is the reason #1 exists. And I do understand the need for it.

Don't get me wrong, I really like the changes in 5.0, but the Java language has become pretty cluttered with deprecated ways to skin a cat. One day it would be nice if they started over again with a clean slate.

-j-
[ March 15, 2005: Message edited by: Jeff Langr ]

Books: Agile Java, Modern C++ Programming with TDD, Essential Java Style, Agile in a Flash. Contributor, Clean Code.
Horatio Westock
Ranch Hand

Joined: Feb 23, 2005
Posts: 221
I see 5.0 as another step in the maturation of Java in much the same way the STL and Templates completely changed C++. As an observation, you still find many C++ coders writing horrendous code and reinventing the wheel.

As Jeff points out, there will certainly be a degree of hybrid styles in many multi-programer (and probably single programer) projects. But for those that take the time to understand and leverage the new features, 5.0 will offer much more elegant ways of working.
Herb Schildt
Author
Ranch Hand

Joined: Oct 01, 2003
Posts: 239
Jeff:

Much of what you say I agree with. However, when you say

- The changes in J2SE 5.0 will be ignored by many.

I agree that some will try to ignore it, but because of generics most won't be able to.

The addition of generics changes Java in many ways. One way that can't be ignored is the fact that it causes a substantial number of the classes and methods in the API to be rewritten for generics. If you try to compile these classes/methods with non-generic code, warning errors will be reported.

Frankly, programmers who ignore generics will be left behind. And no one can afford to be left behind in the fast-moving world of Java programming.

Autoboxing is also hard to ignore because it changes the semantics of the language.
Jeff Langr
author
Ranch Hand

Joined: May 14, 2003
Posts: 762
Originally posted by Herb Schildt:
If you try to compile these classes/methods with non-generic code, warning errors will be reported.

Frankly, programmers who ignore generics will be left behind. And no one can afford to be left behind in the fast-moving world of Java programming.

Autoboxing is also hard to ignore because it changes the semantics of the language.


True on all counts. However, you won't see many programmers trying to create their own parameterized types. And many programmers won't bother using enums. Point being that 4 out of 5 developers won't care enough to know to use the newer features, or have too badly ingrained habits.

-Jeff-
Steven Bell
Ranch Hand

Joined: Dec 29, 2004
Posts: 1071
At my work we are very interested in 5.0. We have gone so far as to give classes about the new features available. However, because we have standardized on eclipse we won't be writing 5.0 code until eclipse 3.1 final is released (and even then it may take a bit to get everybody up to speed there are still some developers working in eclipse 2.1).

I see alot of interest and would suggest it's more along the lines of 4 out of 5 programmers will be using the newer features. Of course my 'poll sample' could be a bit narrow.
Jeff Langr
author
Ranch Hand

Joined: May 14, 2003
Posts: 762
I'm basing my stats on the fact that 4 out of 5 developers still use things like Vector unnecessarily.

-j-
Chengwei Lee
Ranch Hand

Joined: Apr 02, 2004
Posts: 884
Actually I'm not so concern over Tiger's naming convention.

I'm more interested in knowing how widely had it been adopted by the industry. There's always a gap between new technologies & products that embraces them. How soon would BEA, Oracle, IBM & others non-open-source vendors come out with products that features Tiger?



SCJP 1.4 * SCWCD 1.4 * SCBCD 1.3 * SCJA 1.0 * TOGAF 8
Ryan Bailey
Ranch Hand

Joined: Feb 26, 2002
Posts: 134
Hi Herbert,

It will be interesting to read your new book. I took a class thru my company on the new features of Java 5 but one thing that was still kinda grey was annotations - It seems like you could break annotations into a 3 day class. I understand the basics but would like to know more. What are the pros and cons when using XDoclet to generate code versus using annotations? I could see where using annotations would be nice for generating EBJ classes - ie home and remote interfaces. I've searched the web for documentation and tutorials on annotations, and there really isn't a whole lot of details.

Overall, I really like the new features within Java 5.
Thanks!
Ryan


SCJP 1.4, SCWCD
Java: The power, elegance, and simplicity of a hand grenade
Fintan Conway
Ranch Hand

Joined: Apr 03, 2002
Posts: 141

from what I understand this will become :


Enums are useful and somewhat intuitive, but will require a small amount of adjustment of thinking to start using them.

Generics will require a large mind-set adjustment, but offer the greatest potential.

I believe people will use :
1) the most intuitive new features first (for-in loop, autoboxing and enums).

2) Replace StringBuffers with StringBuilders, introduce Scanners and Formatters as they realise that benefits. These features are essentially upgrades to existing mechanisms, so there is only a little bit of learning to do and these can be replaced on a gradual basis.

3) Most programmers will recognise the value of VarArgs and Generics but will only invest the time in learning them when they have a need to use them.

Regards,

Fintan
[ March 16, 2005: Message edited by: Fintan Conway ]
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
Originally posted by Jeff Langr:
I'm basing my stats on the fact that 4 out of 5 developers still use things like Vector unnecessarily.

-j-


Which is caused by 4 out of 5 developers learning Java using books designed for teaching the creation of applets that must run on 1.1 JVMs and never read anything else about the language...

The reason language features from the Tiger will be ignored is because people don't agree with the direction they're pulling the language towards (so political/religious reasons) in addition to that.


42
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
For me, I think I'll use generics (and associated autoboxing) and the new for loop quite a bit in my line of work, enums maybe once in a while, and the rest rarely if ever.
The annotations and printf functions will see no use, the first because I don't agree with them on fundamental principles (coupling code with comments, etc.) and the other because in my practice they make no sense (little use for printf in a web application using JSPs and logging APIs for all output that doesn't go to a mainframe or database).
Varargs methods I'm not yet sure of. Never saw much need for them when doing C++, don't see a need for them now but I'll keep them in mind for whenever they might come in handy.

Of course all that only after we can get some 1.5 JVMs for our target platforms...
Paul Abery
Greenhorn

Joined: Jul 14, 2003
Posts: 5
Originally posted by Jeroen Wenting:

Of course all that only after we can get some 1.5 JVMs for our target platforms...


Thats the main problem for me, as soon as the jrockit works with 1.5 (5.0) then I'll be able to use it.

I think i'll be mainly using generics of all the new featers.

-Paul
Henrik St�hl
Greenhorn

Joined: May 21, 2005
Posts: 1
Our 1.5 version has been out since December 2004, the current update is "SP1". It's available here:

http://commerce.bea.com/products/weblogicjrockit/5.0/jr_50.jsp

Cheers!

Henrik St�hl, JRockit team
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24168
    
  30

Herb was here two months ago -- this is an old thread, ressurected by the advertisement posted above.


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Welcome Herbert Schildt!
 
Similar Threads
Art
Welcome Herbert Schildt!
New To Java
Welcome!
Welcome Herbert Schildt!