Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Core Java 2, Volume I book - Reader question

 
Alvin chew
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
good day everyone,mr.Cay S. Horstmann and mr.Gary Cornell , is this book planned for java programmer certified reference book ? thank you !
 
Alvin chew
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As there have lots of java book around, how this book distinct as compare to other ?
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is this book planned for java programmer certified reference book ?

I dont think so, because the exam objectives for 311-055 is still under development.

Nick
 
Alvin chew
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
where can i get the table of content ?
 
Cay Horstmann
author
Ranch Hand
Posts: 172
15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, Core Java is not designed for certification. Maybe I am biased, but I think it would be best to learn real Java from a regular book, and then spend a few hours to learn the rather strange subset that is tested on the certification exam.

Of the certification books that I have seen, I like Dan Chisholm's mock exam book.

Cheers,

Cay
 
Alvin chew
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
mr.Cay Horstmann, as your book cover Reflection and proxies,do you mind to brief an introduction on these ?
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
where can i get the table of content ?

You can find it here:
http://www.phptr.com/title/0131482025

Nick
 
Cay Horstmann
author
Ranch Hand
Posts: 172
15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, Core Java does cover reflection and proxies.

Briefly, you use reflection to write code that manipulates objects of unrelated classes that may not even be known when you write your program.

For example, look at a builder tool such as NetBeans or the new GUI builder in Eclipse. A user can add a new component--say a calendar--to the toolbar. The GUI builder then discovers method pairs, such as getColor/setColor, getFirstDayOfWeek/setFirstDayOfWeek. For each of these method pairs, it puts up a property editor: a color editor to set the color, an integer editor to edit the first day of the week, and so on.

To discover them, the builder uses code such as the following:



That is reflection in action. The builder reflects on the capabilities of the object, without having to know anything about it. (E.g. there is no fixed interface that toolbar items need to implement.)

I'll post something about proxies after lunch :-)

Cheers,

Cay
 
C Kutler
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looking at the TOC I see it covers all the things I always wanted to learn more about but never took the time. The description says this book is a tutorial and a reference. You also mention code samples. Can you describe a bit (or give examples) of the code examples in the book?

Originally posted by Nicholas Cheung:

You can find it here:
http://www.phptr.com/title/0131482025

Nick
 
Alvin chew
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
mr.cay , from your book where you have mentioned on Covariant Return Types in appendix, can you please brief what is it about ?
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
from your book where you have mentioned on Covariant Return Types in appendix, can you please brief what is it about ?


In the past, subclass cannot overload a method with same method name, same signature but with different return type, however, with the Covariant Return Types feature, it could be done in Tiger.

You can find more info here:
http://www.javaworld.com/weblogs/java101/archives/000205.html

Nick
 
Cay Horstmann
author
Ranch Hand
Posts: 172
15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You asked about code samples in Core Java. I generally try to provide code for tasks that you actually want to do, stripped down to the basics, without being artificial. No inheritance hierarchies of kitchen appliances or zoo animals :-)

You can download the source code from http://horstmann.com/corejava.
 
Alvin chew
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, mr.cay, on chapter 2, you have mentioned on IDE, do you introduce how to use on specify IDE ?
 
Cay Horstmann
author
Ranch Hand
Posts: 172
15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The book introduces Eclipse, and there are a couple of examples that use NetBeans (because the GUI builder in Eclipse is not quite ready for prime time, IMO).

Cheers,

Cay
 
C Kutler
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the pointer to the source code. Now I really want to get the book because I want to link these examples up with what they are illustrating. Looking at the source I see a lot of stuff that can be reused.
 
Barry Hawkins
ranger
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For those who own the previous addition, what are some motivators for upgrading to the new one?
 
Barry Hawkins
ranger
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As one who owns and values your last revision of Core Java, I was a little surprised to see the work back in a single volume. Could you enumerate any key factors that led to this?

Thanks
 
Cay Horstmann
author
Ranch Hand
Posts: 172
15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Core Java still comes in two volumes. Volume 2 will be out around November 26.

There have been quite a few changes in this particular edition. There is lots of new JDK 5.0 material, and all examples have been reworked to take advantage of the 5.0 features. If you use the book as a reference, it is probably worth getting the new edition. If you worked through it once and absorbed everything, it would be more cost-effective to just read one of the many survey articles on the net that describe the JDK 5.0 features.

Cheers,

Cay
 
Barry Hawkins
ranger
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does the new Core Java provide insight as to the applicability and utility of Generics in addition covering the topic from simply a knowledge transfer perspective? There seems to be so much hype on the topic, with lots of "because you can" examples, but can readers expect practical advice on the realities of Generics in Java?

Regards,
 
Barry Hawkins
ranger
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The previous edition of Core Java had notes all throughout that provided additional information for programmers moving from C++ to Java. Given the perception of Java at the time of the last publishing, that would make sense. Today, when so many folks are moving to Java from languages other than C++, has a different approach been taken with the sidebar items that draw analogy to other languages?

Thanks,
 
Cay Horstmann
author
Ranch Hand
Posts: 172
15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Core Java uses generic collections whenever possible. Here is a typical example: In the Swing chapter, you use a map for slider labels. It used to be a Hashtable, and now it is a Hashtable<Integer, Component>. Isn't that a lot clearer? Now there is no guesswork what the keys and values are.

The generics chapter discusses the challenges that you face when implementing generic code, such as wildcards and type bounds. I don't expect that application programmers will want to implement their own generic collection classes, but (1) it is nice to know the reason behind the mumbo-jumbo such as "Comparable<? super T>", and (2) once in a while, there will be an opportunity to write generic code that goes beyond collections.

I guess there is some hype out there about generics, but I think it is overblown. Generics are very nice for collections and algorithms, and not very useful for most other purposes. In C++, it is possible to do all sorts of miraculous things with templates, but in Java, the strong type-checking gets in the way. (Personally, I find this a good thing. I've struggled through lots of articles describing template hacks in C++ that are very clever but utterly useless.)

Cheers,

Cay
 
Alvin chew
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, cay, why not you introduce web start in your book as it getting popular and may going to replace applet ?
 
Cay Horstmann
author
Ranch Hand
Posts: 172
15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Web Start has been in the book since at least the 6th edition. It's in Chapter 10 "Deploying Applets and Applications", together with other goodies such as the Preferences API and JAR files.

Cheers,

Cay
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Web Start has been in the book since at least the 6th edition. It's in Chapter 10 "Deploying Applets and Applications", together with other goodies such as the Preferences API and JAR files.

When is JWS first appeared? From J2SE 1.4? I havent put an eye on it before.

Nick
 
michael fuerst
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do you think Java lacks a With statement analagous to the ones
in Visual Basic and javascript?
Such would be a syntactic convenience which would make for easier to read code. One cannot imagine this being difficult to implement.
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

syntactic convenience which would make for easier to read code

Not really sometimes. For example, if the logic is complicated, you use full set of if-then-else is better then "X?Y:Z".

Also, Tiger tries to simplify the import statements, and introduces *static import*, but I feel this creates more ambigous.

Nick
[ November 17, 2004: Message edited by: Nicholas Cheung ]
 
Cay Horstmann
author
Ranch Hand
Posts: 172
15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java simply took the control structures from C/C++ (with the curious addition of the labeled break and continue statements). C/C++ doesn't have a "with", and the Java designers had bigger fish to fry than control structures. As you point out, there is no technical difficulty in implementing a "with". Still, I don't think it will ever happen.

Cheers,

Cay
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Java simply took the control structures from C/C++

Thus, it is of a small probability that *future* Java to include features from other languages, maybe, even the features are good?

Nick
 
Alvin chew
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
mr.cay, are your planning to write a book which bring your existing fans to web application technology ?
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
will you consider to write Core J2EE or even Core J2ME?

Nick
 
Cay Horstmann
author
Ranch Hand
Posts: 172
15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think I'll ever write Core J2EE. I have a background in graphics, GUIs, databases, etc., so J2SE comes pretty naturally. But I definitely do not have the expertise to write a core level book on J2EE. And John Muchow has beaten me to Core J2ME.

David Geary and myself wrote a book "Core JSF", and now we are waiting for JSF to take off. It's actually a very good technology, but it has not yet taken the world by storm.

David and I are considering a book on Groovy.

Cheers,

Cay
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

David Geary and myself wrote a book "Core JSF", and now we are waiting for JSF to take off. It's actually a very good technology, but it has not yet taken the world by storm.

Does the book printed yet? If not, please remind the publisher to release hardcover version.

Nick
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David and I are considering a book on Groovy.


Cay,

What is Groovy?

Thanks
Pradeep
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is Groovy?

I guess Cay is talking about this:
http://groovy.codehaus.org/

Isnt it?

Nick
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it's script language that have syntax like java.
 
Layne Lund
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Nicholas Cheung:
will you consider to write Core J2EE or even Core J2ME?

Nick

Sun has already published Core J2ME. The author's name is John Muchow. Just search Amazon for it or visit the J2ME forum here at the Ranch.

Layne
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic