Kniha se výrazně liší od běžných programátorských příruček, soustřeďuje se na praktické a efektivní používání Javy a jejích konstrukcí. Nabídne vám 57 cenných rad řešících programátorské problémy, s nimiž se většina vývojářů denně setkává. Obsahuje přesný a výstižný popis technik používaných experty, kteří vyvinuli platformu Java. Tyto rady jasně popisují, co dělat a co naopak nedělat, aby vaše programy byly průzračné, robustní a efektivní.
Are you seeking a deeper understanding of the Java™ programming language to write clearer, more robust, and reusable code? This highly anticipated second edition brings together seventy-eight essential rules of thumb, offering best-practice solutions for everyday programming challenges. Thoroughly updated to reflect Java SE 5 and SE 6 features, it explores new design patterns and language idioms, helping you leverage features like generics, enums, annotations, and autoboxing. Each chapter comprises several standalone essays that provide specific advice, insights into Java subtleties, and excellent code examples. Comprehensive descriptions illuminate what to do, what not to do, and why. Highlights include new coverage of generics, enums, annotations, autoboxing, the for-each loop, varargs, and concurrency utilities, alongside updated techniques on classic topics such as objects, classes, libraries, methods, and serialization. The book also emphasizes avoiding traps and pitfalls associated with commonly misunderstood aspects of the language, focusing on fundamental libraries like java.lang, java.util, and, to a lesser extent, java.util.concurrent and java.io. Ultimately, this edition presents the most practical and authoritative guidelines for writing efficient, well-designed programs.
The Definitive Guide to Java Platform Best Practices--Updated for Java 7, 8, and 9 Java has changed dramatically since the previous edition of Effective Java was published shortly after the release of Java 6. This Jolt award-winning classic has now been thoroughly updated to take full advantage of the latest language and library features. The support in modern Java for multiple paradigms increases the need for specific best-practices advice, and this book delivers. As in previous editions, each chapter of Effective Java, Third Edition, consists of several "items," each presented in the form of a short, stand-alone essay that provides specific advice, insight into Java platform subtleties, and updated code examples. The comprehensive descriptions and explanations for each item illuminate what to do, what not to do, and why. The third edition covers language and library features added in Java 7, 8, and 9, including the functional programming constructs that were added to its object-oriented roots. Many new items have been added, including a chapter devoted to lambdas and streams. New coverage includesFunctional interfaces, lambda expressions, method references, and streams Default and static methods in interfaces Type inference, including the diamond operator for generic types The @SafeVarargs annotation The try-with-resources statement New library features such as the Optional interface, java.time, and the convenience factory methods for collections Register your product at informit.com/register for convenient access to the web edition eBook, updates, and/or corrections as they become available.
Based on Bloch and Gafter's standing room only Java Puzzlers talk at JavaOne,
the heart of the book comprises over 100 Java programming language puzzlers:
brainteasers that challenge the intellect while alerting programmers to the
traps, pitfalls, and corner cases that lurk in the nether regions of the Java
platform. All of the puzzles from the authors' popular JavaOne presentations
are included, as are many puzzles never before seen in public. There are two
major types of puzzles in the book. Most of the puzzles take the form of short
programs that appear to do something but actually do something else. Readers
will be encouraged to predict the behavior of the program before running it.
After running the program, readers will be encouraged to figure out why it
behaved as it did before consulting the solution. In a second type of puzzle,
the reader will be asked to write a short program that performs some specific
task. Most of the solutions will contain a moral, a rule the reader can follow
to avoid the problematic behavior demonstrated in the puzzle. The puzzles are
grouped into chapters based on the primary platform features they exercise and
to maximize readability, fun, and pedagogical effectiveness.
DER Java-Klassiker. Jetzt aktualisiert! Seit der Vorauflage von »Effective Java«, die kurz nach dem Release von Java 6 erschienen ist, hat sich Java dramatisch verändert. Dieser preisgekrönte Klassiker wurde nun gründlich aktualisiert, um die neuesten Sprach- und Bibliotheksfunktionen vorzustellen. Erneut zeigt Java-Kenner Joshua Bloch anhand von Best Practices, wie Java moderne Programmierparadigmen unterstützt. Wie in früheren Ausgaben besteht jedes Kapitel von »Effective Java« aus mehreren Themen, die jeweils in Form eines kurzen, eigenständigen Essays präsentiert werden. Dieses enthält jeweils spezifische Ratschläge, Einblicke in die Feinheiten der Java-Plattform und Codebeispiele. Umfassende Beschreibungen und Erklärungen für jedes Thema beleuchten, was zu tun ist, was nicht zu tun ist und warum es zu tun ist. Die dritte Auflage behandelt Sprach- und Bibliotheksfunktionen, die in Java 7, 8 und 9 hinzugefügt wurden, einschließlich der funktionalen Programmierkonstrukte. Neue Themen sind unter anderem: - Functional Interfaces, Lambda-Ausdrücke, Methodenreferenzen und Streams - Default- und statische Methoden in Interfaces - Type Inference, einschließlich des Diamond-Operators für generische Typen - Die Annotation @SafeVarargs - Das Try-with-Resources-Statement - Neue Bibliotheksfunktionen wie das Optional Interface, java. time und die Convenience-Factory-Methoden für Collections
Język Java jest konsekwentnie udoskonalany i unowocześniany dzięki
zaangażowaniu wielu ludzi. Nowoczesny język Java staje się coraz bardziej
wieloparadygmatowy, co oznacza, że stosowanie najlepszych praktyk w coraz
większym stopniu determinuje jakość kodu. Obecnie napisanie kodu, który
prawidłowo działa i może być łatwo zrozumiany przez innych programistów, nie
wystarczy - należy zbudować program w taki sposób, aby można było go łatwo
modyfikować. Jako że Java stała się obszerną i złożoną platformą, konieczne
stało się uaktualnienie najlepszych praktyk. Ta książka jest kolejnym, trzecim
wydaniem klasycznego podręcznika programowania w Javie. Poszczególne rozdziały
zostały gruntownie przejrzane, zaktualizowane i wzbogacone o sporo ważnych
treści. Znalazło się tu wiele wartościowych porad dotyczących organizowania
kodu w taki sposób, aby stał się przejrzysty, co ułatwi przyszłe modyfikacje i
usprawnienia. Poza takimi zagadnieniami, jak programowanie zorientowane
obiektowo czy korzystanie z różnych typów, obszernie omówiono stosowanie lambd
i strumieni, zasady obsługi wyjątków, korzystania ze współbieżności i
serializacji. Książka składa się z dziewięćdziesięciu tematów pogrupowanych w
dwanaście rozdziałów. Taki układ pozwala na szybkie odnalezienie potrzebnego
rozwiązania. W książce między innymi: interfejsy funkcyjne, wyrażenia lambda,
referencje do metod oraz strumienie metody domyślne i statyczne w interfejsach
wnioskowanie typów korzystanie z SafeVarargs instrukcja try z zasobami nowe
elementy bibliotek Javy
Język Java jest językiem obiektowym z dziedziczeniem jednobazowym. Wewnątrz
każdej metody korzysta on ze zorientowanego na instrukcje stylu kodowania. Aby
dobrze poznać jakikolwiek język, należy nauczyć się posługiwać jego regułami,
zasadami i składnią -- podobnie jest z językiem programowania. Jeśli chcesz
zyskać możliwość efektywnego programowania w języku Java, powinieneś poznać
struktury danych, operacje i udogodnienia, oferowane przez biblioteki
standardowe, a także często stosowane i efektywne sposoby tworzenia kodu. Całą
potrzebną Ci wiedzę znajdziesz właśnie w tym podręczniku.W książce Java.
Efektywne programowanie w sposób zrozumiały i klarowny przedstawiono zasady
opisujące mechanizmy używane w najlepszych technikach programowania. Ten
podręcznik podpowie Ci, jak najbardziej racjonalnie korzystać z języka Java
oraz jego podstawowych bibliotek. Dowiesz się, jak stosować wyjątki
przechwytywalne i wyjątki czasu wykonania, poznasz także zalety stosowania
statycznych klas składowych. Opanujesz metody sprawdzania poprawności
parametrów i projektowania sygnatur oraz wszelkie instrukcje, które pozwolą Ci
na wydajne i profesjonalne programowanie.