aspose file tools*
The moose likes Java in General and the fly likes Start Learning Version 5 Now! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Start Learning Version 5 Now!" Watch "Start Learning Version 5 Now!" New topic
Author

Start Learning Version 5 Now!

Herb Schildt
Author
Ranch Hand

Joined: Oct 01, 2003
Posts: 239
Many posts have asked whether a programmer should start working with J2SE 5 now, using Beta 2, or wait for the release. My thoughts on this are straightforward: Start Now!

Java 2, v5 is a watershed event, and J2SE 5 is not like the previous upgrades to Java. For past upgrades, you could learn the new features in a day or two. This is not the case with Java 2, v5! Version 5 fundamentally alters the language.

Here are some examples:

1. Generics add an entirely new capability and syntax element. Generics are retrofitted throughout the API. I can't say it any more strongly: generics fundamentally change Java.

2. Autoboxing/unboxing change the interplay between primitive types and objects by providing automatic wrapping and unwrapping of primitive values. This occurs behind the scenes. Although easy to use, and a great new feature in my opinion, it also introduces potential side effects.

3. Metadata (also called Annotations) adds an entirely new feature to the language that allows you to embed additional information into your program that can be used by various tools and accessed via reflection. This is a major new feature that can't be understand without some serious study.

4. Enumerations add a long desired capability. However, their capabilities go way beyond what you might expect. Enumerations are full objects in Java. It will take more than a couple hours of study to fully understand how to take advantage of their power.

5. Varargs (variable-length arguments) enable us to easily create methods that take a variable number of arguments. Unfortunately, they also introduce the possibility of ambiguity errors -- especially when retrofitting legacy code.

I have been working with the new features in J2SE 5 for several months now and in my opinion you simply must start learning about version 5 as soon as possible. Don't get left behind by this second "Java Revolution."


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

Joined: Feb 27, 2002
Posts: 8919

Hi Herb,

I want to learn Java 5 and your book would be the right one to start with.


Groovy
Michael Cleary
Ranch Hand

Joined: Jul 29, 2003
Posts: 93
Sound advice I'd say....and for free! Even though I won't be able to apply it to projects at work for a while, I'm going to work w/ it as much as I can on my own...


Mike<br />SCJP 1.4<br />----------------------------<br />mdcleary@earthlink.net<br />----------------------------<br />There are 10 types of people<br />in the world. Those that <br />understand binary, and those<br />that don't.
somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
Let go to Java 5.0


SCJA,SCJP,SCWCD,SCBCD,SCEA I
Java Developer, Thailand
Gian Franco
blacksmith
Ranch Hand

Joined: Dec 16, 2003
Posts: 977
Hi

Sun provides some good tutorials on e.g. threads,
assertions.

Are any of these learning paths allready available
for Java's new features?

Cheers,

Gian Franco Casula


"Eppur si muove!"
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
maybe when Tomcat, Xerces, Xalan, JSTL, etc. etc. work with it.
Before that I simply have no time to invest in it as we're swamped (well, inundated) with work getting applications out the door (and my spare time is spent working on SCJP 1.4 right now).


42
Gian Franco
blacksmith
Ranch Hand

Joined: Dec 16, 2003
Posts: 977
Hi Jeroen,

Did you write Sun's tutorials? If so,
I would like to thank you for their
good quality.

Cheers,

Gian Franco Casula
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
Originally posted by Herb Schildt:
Don't get left behind by this second "Java Revolution."


When was the first Java Revolution? Java 2 or 1.2? Or was it the same naming confusion incident as this J2SE 5.0 and 1.5?

Just curious to know about the first Java revolution in the past in brief.. Thanks and here I'm on my way to ride a Tiger...


Co-author of SCMAD Exam Guide, Author of JMADPlus
SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
Alvin chew
Ranch Hand

Joined: Jan 08, 2004
Posts: 834
Mr.Herb Schildt, as for this tiger version, i found it like completely change of java , my question is, is it necessary we need to learn all these new features? as compare by using java 1.4, it done a good job as well ..will it be significant well improve on performance issue in java tiger?
Ben Wood
Ranch Hand

Joined: Aug 14, 2001
Posts: 342
Herb,

Like Jeroen I am obliged to continue with several projects under 1.4 as I simply don't have the time to learn about all the new 1.5 features straight away and start using them in project code. I am very interested to learn what is new under 1.5 but this learning process will be gradual. I would be wary of attempting to develop production code at work under a beta release of the SDK. I tried that once before with 1.4 and half my applications developed problems (which disappeared on the final 1.4 release ).

Given that some of us don't have the spare resources to learn all the new 1.5 stuff straight away, I would be interested to know what your opinion is on what should be learned sooner rather than later. Also, of particular interest are areas which could cause problems in applications developed under 1.4 SDK when we run them under 1.5. This is a major issue I think...I hope I don't end up learning about 1.5 in an effort to get applications working properly again.


SCJP 1.4, www.gsi3d.org.uk
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
Originally posted by Alvin chew:
is it necessary we need to learn all these new features?

No I don't think we need to learn all the features that is coming with Tiger. The thing is that we need to know which features will give us the best performace and easiness to code and we need to adopt them as needed...
will it be significant well improve on performance issue in java tiger?

Of course, I also believe Tiger got a better performance than any other version before... But unfortunately, Swing has been neglected in performance improvement...
Chris Dempsey
Greenhorn

Joined: Feb 24, 2004
Posts: 9
Originally posted by Herb Schildt:
[QB]Many posts have asked whether a programmer should start working with J2SE 5 now, using Beta 2, or wait for the release. My thoughts on this are straightforward: Start Now!

I find your ideas interesting and would like to subscribe to your newsletter.
Herb Schildt
Author
Ranch Hand

Joined: Oct 01, 2003
Posts: 239
Ben and Jeroen:

I am not suggesting that you use J2SE 5 beta for your current projects. What I am saying is that I believe that programmers need to start learning the new features now. This means "playing with" Beta 2, writing sample code, etc. The learning curve on generics is rather steep and it is something that you will want to start getting a handle on now.

Ko Ko; The first Java revolution was the one created when Java was first released!
[ August 26, 2004: Message edited by: Herb Schildt ]
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
Originally posted by Ben Wood:
Given that some of us don't have the spare resources to learn all the new 1.5 stuff straight away, I would be interested to know what your opinion is on what should be learned sooner rather than later.


Just to share my own opinion and based on my past experience on Java, I will learn Generics, Enumerations and Variable-length Arguments features first... Cos I do believe that they can make my Java programming skill higher and also they will surely be useful in my work.... After then, I will go the rest of the Tiger's features...

Just my 2 cents...
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
Originally posted by Herb Schildt:
Ko Ko; The first Java revolution was the one created when Java was first released!

Wasn't that evolution of Java? Revolution should come from something that is existing, shouldn't it?
Rick Portugal
Ranch Hand

Joined: Dec 17, 2002
Posts: 243
J2SE 5.0 is still in Beta. When is it expected to be ready for prime time?


IBM 286, SCJP, SCWCD, EIEIO
Ben Wood
Ranch Hand

Joined: Aug 14, 2001
Posts: 342
This means "playing with" Beta 2


ah, I see. I just installed 1.5 on a PC for this very purpose actually . It's interesting to see how all my GUI apps now look in the new Ocean l&f

Have tried a couple of rudimentary generics examples out. I can see the usefulness of this actually; a lot of my applications deal with large collections of objects - so using generics will presumably stop me from attempting an illegal cast at runtime, and flag this up at compile time even.
Herb Schildt
Author
Ranch Hand

Joined: Oct 01, 2003
Posts: 239
Ben:

You are right. A major benefit of generics is that it moves some types of runtime errors (such as invalid cast errors) into compile-time errors, where they can be prevented.
Waseem Akhtar
Greenhorn

Joined: Feb 16, 2001
Posts: 20
can anyone tell when was version 5.0 relased axactly?


_ _ _ ___ _ _ _ <br />Waseem Soomro,<br />_ _ _ ___ _ _ _
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
Originally posted by Waseem Akhtar:
can anyone tell when was version 5.0 relased axactly?


It was not released yet... you might want to have a look at this thread, where we were discussing about the final release of version 5.0...

The thing is that no one knows exactly when it will be released...
somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
Originally posted by Herb Schildt:
Ben:

You are right. A major benefit of generics is that it moves some types of runtime errors (such as invalid cast errors) into compile-time errors, where they can be prevented.


So,
Generics feature of Java 5.0 is enough to prevented runtime error or not ???
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
Originally posted by Somkiat Puisungnoen:


So,
Generics feature of Java 5.0 is enough to prevented runtime error or not ???


Yes, but not all, only in the case where we would have to deal with generics and multi-object type stuff...

Runtime errors in other places are still needed to be prevented by the application itself...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Start Learning Version 5 Now!