Showing posts with label generics. Show all posts
Showing posts with label generics. Show all posts

The Java Class Libraries: An Annotated Reference (Java Series) (v. 1) Review

The Java Class Libraries: An Annotated Reference (Java Series) (v. 1)
Average Reviews:

(More customer reviews)
Are you looking to buy The Java Class Libraries: An Annotated Reference (Java Series) (v. 1)? Here is the right place to find the great deals. we can offer discounts of up to 90% on The Java Class Libraries: An Annotated Reference (Java Series) (v. 1). Check out the link below:

>> Click Here to See Compare Prices and Get the Best Offers

The Java Class Libraries: An Annotated Reference (Java Series) (v. 1) ReviewThis is a great book, but you want the second edition, which covers up to Java 1.1. Its ISBN is different.The Java Class Libraries: An Annotated Reference (Java Series) (v. 1) OverviewProviding coverage of the Java API and the Window Toolkit and Applet packages, this text features detailed examples that are drawn from the author's experience of programming with the API.

Want to learn more information about The Java Class Libraries: An Annotated Reference (Java Series) (v. 1)?

>> Click Here to See All Customer Reviews & Ratings Now
Read More...

Java Generics and Collections Review

Java Generics and Collections
Average Reviews:

(More customer reviews)
Are you looking to buy Java Generics and Collections? Here is the right place to find the great deals. we can offer discounts of up to 90% on Java Generics and Collections. Check out the link below:

>> Click Here to See Compare Prices and Get the Best Offers

Java Generics and Collections ReviewThe intent of Generics is make your Java code type-safer. While Java is a strongly typed language, it lacks type-safety when it comes to using collections. Generics were added to the Java programming language in 2004 as part of J2SE 5.0. Unlike C++ templates, generic Java code generates only one compiled version of a generic class. Generic Java classes can only use object types as type parameters -- primitive types are not allowed. Thus a List of type Integer, which uses a primitive wrapper class is legal, while a List of type int is not legal.
Part I of this book provides a thorough introduction to generics. Generics are a powerful, and sometimes controversial, new feature of the Java programming language. This part of the book describes generics, using the Collections Framework as a source of examples.
The first five chapters focus on the fundamentals of generics. Chapter 1 gives an overview of generics and other new features in Java 5, including boxing, foreach loops, and functions with a variable number of arguments. Chapter 2 reviews how subtyping works and explains how wildcards let you use subtyping in connection with generics. Chapter 3 describes how generics work with the Comparable interface, which requires a notion of bounds on type variables. Chapter 4 looks at how generics work with various declarations, including constructors, static members, and nested classes. Chapter 5 explains how to evolve legacy code to exploit generics, and how ease of evolution is a key advantage of the design of generics in Java. Once you have these five chapters under your belt, you will be able to use generics effectively in most basic situations.
The next four chapters treat advanced topics. Chapter 6 explains how the same design that leads to ease of evolution also necessarily leads to a few rough edges in the treatment of casts, exceptions, and arrays. The fit between generics and arrays is the worst rough corner of the language, so two principles are formulated to help work around the problems. Chapter 7 explains new features that relate generics and reflection, including the newly generified type "Class T" and additions to the Java library that support reflection of generic types. Chapter 8 contains advice on how to use generics effectively in practical coding. Checked collections, security issues, specialized classes, and binary compatibility are all considered. Chapter 9 presents five extended examples, looking at how generics affect five well-known design patterns: Visitor, Interpreter, Function, Strategy, and Subject-Observer. The following is a list of chapters in part one:
Chapter 1. Introduction
Chapter 2. Subtyping and Wildcards
Chapter 3. Comparison and Bounds
Chapter 4. Declarations
Chapter 5. Evolution, Not Revolution
Chapter 6. Reification
Chapter 7. Reflection
Chapter 8. Effective Generics
Chapter 9. Design Patterns
Part II is about the Java Collections Framework, which is a set of interfaces and classes in the packages java.util and java.util.concurrent. They provide client programs with various models of how to organize their objects, and various implementations of each model. These models are sometimes called abstract data types, and they are needed because different programs need different ways of organizing their objects. In one situation, you might want to organize your program's objects in a sequential list because their ordering is important and there are duplicates. In another, a set might be the right data type because now ordering is unimportant and you want to discard the duplicates. These two data types and others are represented by different interfaces in the Collections Framework, and there are examples of their use in chapter 10. However, none of these data types has a single "best" implementation--that is, one implementation that is better than all the others for all the operations. For example, a linked list may be better than an array implementation of lists for inserting and removing elements from the middle, but much worse for random access. So choosing the right implementation for a program involves knowing how it will be used as well as what is available.
This part of the book starts with an overview of the Framework and then looks in detail at each of the main interfaces and the standard implementations of them. Finally the book examines the special-purpose implementation and generic algorithms provided in the Collections class. The following is a list of chapters in part two:
Chapter 10. The Main Interfaces of the Java Collections Framework
Chapter 11. Preliminaries
Chapter 12. The Collection Interface
Chapter 13. Sets
Chapter 14. Queues
Chapter 15. Lists
Chapter 16. Maps
Chapter 17. The Collections Class
Overall, this is a very good book on the subject of Java generics, and I highly recommend it.Java Generics and Collections Overview
This comprehensive guide shows you how to master the most important changes to Java since it was first released.Generics and the greatly expanded collection libraries have tremendously increased the power of Java 5 and Java 6.But they have also confused many developers who haven't known how to take advantage of these new features.

Java Generics and Collections covers everything from the most basic uses of generics to the strangest corner cases.It teaches you everything you need to know about the collections libraries, so you'll always know which collection is appropriate for any given task, and how to use it.

Topics covered include:

Fundamentals of generics: type parameters and generic methods
Other new features: boxing and unboxing, foreach loops, varargs
Subtyping and wildcards
Evolution not revolution: generic libraries with legacy clients and generic clients with legacy libraries
Generics and reflection
Design patterns for generics
Sets, Queues, Lists, Maps, and their implementations
Concurrent programming and thread safety with collections
Performance implications of different collections

Generics and the new collection libraries they inspired take Java to a new level.If you want to take your software development practice to a new level, this book is essential reading.

Philip Wadler is Professor of Theoretical Computer Science at the University of Edinburgh, where his research focuses on the design of programming languages.He is a co-designer of GJ, work that became the basis for generics in Sun's Java 5.0.

Maurice Naftalin is Technical Director at Morningside Light Ltd., a software consultancy in the United Kingdom.He has most recently served as an architect and mentor at NSB Retail Systems plc, and as the leader of the client development team of a major UK government social service system.

"A brilliant exposition of generics. By far the best book on the topic, it provides a crystal clear tutorial that starts with the basics and ends leaving the reader with a deep understanding of both the use and design of generics." Gilad Bracha, Java Generics Lead, Sun Microsystems


Want to learn more information about Java Generics and Collections?

>> Click Here to See All Customer Reviews & Ratings Now
Read More...

Effective Java (2nd Edition) Review

Effective Java (2nd Edition)
Average Reviews:

(More customer reviews)
Are you looking to buy Effective Java (2nd Edition)? Here is the right place to find the great deals. we can offer discounts of up to 90% on Effective Java (2nd Edition). Check out the link below:

>> Click Here to See Compare Prices and Get the Best Offers

Effective Java (2nd Edition) ReviewPlease see my review of the first edition for my general response. My opinion hasn't changed with the second, so I'll focus on what's new in this review.
The second edition was well worth the wait. The number of items are beefed up to 78 from 57. The chapter "Substitutes for C Constructs" is gone, but replaced by more contemporary material on "Generics" and "Enums and Annotations." Some first edition items have been amended to address features new to Java since the first edition was released. Some new items also address concurrency, favoring it over traditional Java threads. As expected, the cases for each item are methodically and persuaisvely made. If you are particularly interested in concurrency, also consider Java Concurrency in Practice.
The item discussions use boldface liberally to highlight key points, sometimes calling attention to arguments in the first edition that have been updated. If you're skimming -- the author in fact doesn't encourage cover-to-cover reading -- these highlights are useful attractors to important material you might otherwise gloss.
It's often helpful to have practices or insights you've earned on your own backed up by a reputable authority. Effective Java certainly helps with that. More importantly, the arguments that support his items are clear, easy to read, and compelling. Anyone proficient with Java would have to go a long way to find fault with them. In fact, it took considerable investigation to determine that one item from the first edition -- "Provide a readResolve method when necessary" -- was not the best advice for some cases. Bloch addresses that issue head-on in this edition, and provides its replacement ("For instance control, prefer enum types to readResolve").
As with the first edition, this one is a necessity for any serious Java developer.Effective Java (2nd Edition) OverviewAre you looking for a deeper understanding of the Java™ programming language so that you can write code that is clearer, more correct, more robust, and more reusable? Look no further! Effective Java™, Second Edition, brings togetherseventy-eight indispensable programmer's rules of thumb: working, best-practice solutions for the programming challenges you encounter every day.This highly anticipated new edition of the classic, Jolt Award-winning work has been thoroughly updated to cover Java SE 5 and Java SE 6 features introduced since the first edition. Bloch explores new design patterns and language idioms, showing you how to make the most of features ranging from generics to enums, annotations to autoboxing.Each chapter in the book consists of several "items" presented in the form of a short, standalone essay that provides specific advice, insight into Java platform subtleties, and outstanding code examples. The comprehensive descriptions and explanations for each item illuminate what to do, what not to do, and why.Highlights include: New coverage of generics, enums, annotations, autoboxing, the for-each loop, varargs, concurrency utilities, and much more

Want to learn more information about Effective Java (2nd Edition)?

>> Click Here to See All Customer Reviews & Ratings Now
Read More...