|
Re: Where is Thinking in Java, 4th Edition?
|
Posted: Feb 17, 2006 7:12 AM
|
|
Hi Bruce,
I have read the Preview copy from your site of TIJ-4 It does include only first seven chapters (Introduction, Introduction to Objects, Everything is an Object, Operators, Controlling Execution, Initialization and Cleanup and AccessControl). There was nothing new in these chapters except Enhanced For Loop (I have not compared it with the third edition entirely and perhaps it includes some changes in previously present topics, but I am speaking of only new topics included).
The chapter on Annotations and generics is not included in the sample chapters. I am eagerly waiting for it. There is very little talked about Annotations and they are often critisized by people by saying "Framework junkies will pick annotation as a replacement of all kinds of metadata And the annotations make code ugly" There is really little said about inheritance in annotations and what about If we have two annotations with same name but in different packages? And In generics, please also include information about inner classes' behavior regarding the generic Type. For example the first code snippet written below does not compile while second code snippet compiles.
/** Code Listing - 1 */
class MyClass<T> {
public void print(T obj) { System.out.println(obj); }
class Inner<T> { public void print(T obj) { MyClass.this.print(obj); } }
}
/** Code Listing - 2 */
class MyClass<T> {
public void print(T obj) { System.out.println(obj); }
class Inner<t extends T> { public void print(t obj) { MyClass.this.print(obj); } }
}
I do understand the difference but find it difficult to explain myself.
Would you explain it in your chapter on Generics?
|
|