没有合适的资源?快使用搜索试试~ 我知道了~
首页Java By Comparison - Become a Java Craftsman in 70 Examples
资源详情
资源评论
资源推荐

Java by
Comparison
Become
a Java Craftsman
in 70 Examples
Foreword by Venkat
Subramaniam
Edited by Andrea Stewart
Simon Harrer,
Jorg Lenhard, Linus Dietz

Java by Comparison
Become a Java Craftsman in 70 Examples
by Simon Harrer, Jörg Lenhard, Linus Dietz
Version: P1.0 (March 2018)
Copyright © 2018 The Pragmatic Programmers, LLC.

This book is licensed to
the individual who purchased it. We don't copy-protect it because that would limit your
ability to use it for your own purposes. Please don't break this trust—you can use
this across all of your devices but please do not share this copy with other members of
your team, with friends, or via file sharing services. Thanks.
Many of the designations used by manufacturers and sellers to distinguish their
products are claimed as trademarks. Where those designations appear in this book,
and The Pragmatic Programmers, LLC was aware of a trademark claim, the
designations have been printed in initial capital letters or in all capitals. The Pragmatic
Starter Kit, The Pragmatic Programmer, Pragmatic Programming, Pragmatic
Bookshelf and the linking g device are trademarks of The Pragmatic Programmers,
LLC.
Every precaution was taken in the preparation of this book.
However, the publisher assumes no responsibility for errors or omissions, or for
damages that may result from the use of information (including program listings)
contained herein.

About the Pragmatic Bookshelf
The Pragmatic Bookshelf is an agile publishing company. We’re here because we
want to improve the lives of developers. We do this by creating timely, practical titles,
written by programmers for programmers.
Our Pragmatic courses, workshops, and other products can help you and your team
create better software and have more fun. For more information, as well as the latest
Pragmatic titles, please visit us at http://pragprog.com
.
Our ebooks do not contain any Digital Restrictions Management, and have always been
DRM-free. We pioneered the beta book concept, where you can purchase and
read a book while it’s still being written, and provide feedback to the author to help
make a better book for everyone. Free resources for all purchasers include source code
downloads (if applicable), errata and discussion forums, all available on the book's
home page at pragprog.com. We’re here to make your life easier.
New Book Announcements
Want to keep up on our latest titles and announcements, and occasional special offers?
Just create an account on pragprog.com
(an email address and a password is all it
takes) and select the checkbox to receive newsletters. You can also follow us on
twitter as @pragprog.
About Ebook Formats
If you buy directly from pragprog.com
, you get ebooks in all available formats for one
price. You can synch your ebooks amongst all your devices (including iPhone/iPad,
Android, laptops, etc.) via Dropbox. You get free updates for the life of the edition.
And, of course, you can always come back and re-download your books when needed.
Ebooks bought from the Amazon Kindle store are subject to Amazon's polices.
Limitations in Amazon's file format may cause ebooks to display differently on
different devices. For more information, please see our FAQ at
pragprog.com/frequently-asked-questions/ebooks
. To learn more about this book and
access the free resources, go to https://pragprog.com/book/javacomp, the book's
homepage.
Thanks for your continued support,
Andy Hunt
The Pragmatic Programmers
The team that produced this book includes: Andy Hunt (Publisher),
Janet Furlow (VP of Operations), Brian MacDonald (Managing Editor),
Jacquelyn Carter (Supervising Editor), Andrea Stewart (Development Editor),
Liz Welch (Copy Editor), Potomac Indexing, LLC (Indexing),
Gilson Graphics (Layout)
For customer support, please contact support@pragprog.com
.
For international rights, please contact rights@pragprog.com.

Table of Contents
Foreword
Acknowledgments
Welcome!
Who Should Read This Book
Why Read This Book?
How to Read This Book
Online Resources
Get Ready for Your Mission to Mars
1. Start Cleaning Up
Avoid Unnecessary Comparisons
Avoid Negations
Return Boolean Expressions Directly
Simplify Boolean Expressions
Avoid NullPointerException in Conditionals
Avoid Switch Fallthrough
Always Use Braces
Ensure Code Symmetry
What Have You Learned?
2. Level Up Your Code Style
Replace Magic Numbers with Constants
Favor Enums Over Integer Constants
剩余289页未读,继续阅读



















安全验证
文档复制为VIP权益,开通VIP直接复制

评论3