Quotes from Effective Java Programming Language Guide

272 pages

Rating: (5.1K votes)


“One advantage of static factory methods is that, unlike constructors, they have names.”
― quote from Effective Java Programming Language Guide


“Learning the art of programming, like most other disciplines, consists of first learning the rules and then learning when to break them.”
― quote from Effective Java Programming Language Guide


“Collection or an appropriate subtype is generally the best return type for a public, sequence- returning method.”
― quote from Effective Java Programming Language Guide


“Writing concurrent programs in Java keeps getting easier, but writing concurrent programs that are correct and fast is as difficult as it ever was.”
― quote from Effective Java Programming Language Guide


“A second advantage of static factory methods is that, unlike constructors, they are not required to create a new object each time they're invoked.”
― quote from Effective Java Programming Language Guide



“If you export a nontrivial interface, you should strongly consider providing a skeletal implementation to go with it. To the extent possible, you should provide the skeletal implementation via default methods on the interface so that all implementors of the interface can make use of it.”
― quote from Effective Java Programming Language Guide


“Implementing a constant interface causes this implementation detail to leak into the class’s exported API. It is of no consequence to the users of a class that the class implements a constant interface. In fact, it may even confuse them. Worse, it represents a commitment: if in a future release the class is modified so that it no longer needs to use the constants, it still must implement the interface to ensure binary compatibility. If a nonfinal class implements a constant interface, all of its subclasses will have their namespaces polluted by the constants in the interface.”
― quote from Effective Java Programming Language Guide


“You can put any element into a collection with a raw type, easily corrupting the collection’s type invariant (as demonstrated by the unsafeAdd method on page 119); you can’t put any ele- ment (other than null) into a Collection<?>.”
― quote from Effective Java Programming Language Guide


“arrays are covariant. This scary-sounding word means simply that if Sub is a subtype of Super, then the array type Sub[] is a subtype of the array type Super[]. Generics, by contrast, are invariant: for any two distinct types Type1 and Type2, List is neither a subtype nor a supertype of List. You might think this means that generics are deficient, but arguably it is arrays that are deficient.”
― quote from Effective Java Programming Language Guide


“A forEach operation that does anything more than present the result of the computation performed by a stream is a “bad smell in code,” as is a lambda that mutates state.”
― quote from Effective Java Programming Language Guide



“streams do not make iteration obsolete”
― quote from Effective Java Programming Language Guide


“premature optimization is the root of all evil. —Donald E. Knuth [”
― quote from Effective Java Programming Language Guide


“In other words, it is about 50 times slower to create and destroy objects with finalizers.”
― quote from Effective Java Programming Language Guide


“In fact, two-thirds of the uses of the close method in the Java libraries were wrong in 2007.”
― quote from Effective Java Programming Language Guide


“There is no way to extend an instantiable class and add a value component while preserving the equals contract, unless you’re willing to forgo the benefits of object-oriented abstraction.”
― quote from Effective Java Programming Language Guide



“Given all the problems associated with Cloneable, new interfaces should not extend it, and new extendable classes should not implement it.”
― quote from Effective Java Programming Language Guide


“It is too early to say whether modules will achieve widespread use outside of the JDK itself. In the meantime, it seems best to avoid them unless you have a compelling need.”
― quote from Effective Java Programming Language Guide


“Builder pattern is more verbose than the telescoping constructor pattern, so it should be used only if there are enough parameters, say, four or more.”
― quote from Effective Java Programming Language Guide


Popular quotes

“Little of that makes for love, but it does pump desire. The woman who churned a man's blood as she leaned all alone on a fence by a country road might not expect even to catch his eye in the City. But if she is clipping quickly down the big-city street in heels, swinging her purse, or sitting on a stoop with a cool beer in her hand, dangling her shoe from the toes of her foot, the man, reacting to her posture, to soft skin on stone, the weight of the building stressing the delicate, dangling shoe, is captured. And he'd think it was the woman he wanted, and not some combination of curved stone, and a swinging, high-heeled shoe moving in and out of sunlight. He would know right away the deception, the trick of shapes and light and movement, but it wouldn't matter at all because the deception was part of it too. Anyway, he could feel his lungs going in and out. There is no air in the City but there is breath, and every morning it races through him like laughing gas brightening his eyes, his talk, and his expectations. In no time at all he forgets little pebbly creeks and apple trees so old they lay their branches along the ground and you have to reach down or stoop to pick the fruit. He forgets a sun that used to slide up like the yolk of a good country egg, thick and red-orange at the bottom of the sky, and he doesn't miss it, doesn't look up to see what happened to it or to stars made irrelevant by the light of thrilling, wasteful street lamps.

That kind of fascination, permanent and out of control, seizes children, young girls, men of every description, mothers, brides, and barfly women, and if they have their way and get to the City, they feel more like themselves, more like the people they always believed they were.”
― Toni Morrison, quote from Jazz


“Life is the bad
with all the good.

The deadly sharks
with the beautiful sea stars.

The gigantic waves
with the sand castles.

The licorice
with the lemon and lime.

The loud lyrics
with the rhythm of the music.

The liver disease
with the love of a father and son.

It’s life.

Sweet, beautiful,
wind on your face,
air in your lungs,
kisses on your lips.
life.”
― Lisa Schroeder, quote from The Day Before


“There’s no such thing in this world as absolute certainty. So accept that and go forward acting toward the best outcome no matter what.”
― Kenneth Atchity, quote from The Messiah Matrix


“What is the ultimate good in the good news? It all ends in one thing: God himself. All the words of the gospel lead to him, or they are not gospel.

Salvation is not good news if it only saves from hell and not for God.

Forgiveness is not good news if it only gives relief from guilt and doesn't open the way to God.

Justification is not good news if it only makes us legally acceptable to God but doesn't bring fellowship with God.

Redemption is not good news if it only liberates us from bondage but doesn't bring us to God.

Adoption is not good news if it only puts us in the Father's family but not in his arms.

This is crucial. Many people seem to embrace the good news without embracing God. There is no sure evidence that we have a new heart just because we want to escape hell. That's a perfectly natural desire, not a supernatural one.

It doesn't take a new heart to want the psychological relief of forgiveness, or the removal of God's wrath, or the inheritance of God's world. All these things are understandable without any spiritual change. You don't need to be born again to want these things.

The devils want them.

It is not wrong to want them. Indeed it is folly not to.

But the evidence that we have been changed is that we want these things because they bring us to the enjoyment of God. This is the greatest thing Christ died for. "Christ also suffered once for sin, the righteous for the unrighteous, that he might bring us to God”
― John Piper, quote from The Passion of Jesus Christ


“In the final analysis, the only available options are either to reject the cross and with it the core of the Christian faith or to take up one's cross, follow the Crucified-and be scandalized ever anew by the challenge.”
― Miroslav Volf, quote from Exclusion & Embrace: A Theological Exploration of Identity, Otherness, and Reconciliation


Interesting books

Asking For It
(9.8K)
Asking For It
by Louise O'Neill
School's Out - Forever
(103.6K)
School's Out - Forev...
by James Patterson
Fractured
(10.6K)
Fractured
by Dani Atkins
The Confectioner's Tale
(1K)
The Confectioner's T...
by Laura Madeleine
The Inferno
(116.8K)
The Inferno
by Dante Alighieri
How to Build a Girl
(23.3K)
How to Build a Girl
by Caitlin Moran

About BookQuoters

BookQuoters is a community of passionate readers who enjoy sharing the most meaningful, memorable and interesting quotes from great books. As the world communicates more and more via texts, memes and sound bytes, short but profound quotes from books have become more relevant and important. For some of us a quote becomes a mantra, a goal or a philosophy by which we live. For all of us, quotes are a great way to remember a book and to carry with us the author’s best ideas.

We thoughtfully gather quotes from our favorite books, both classic and current, and choose the ones that are most thought-provoking. Each quote represents a book that is interesting, well written and has potential to enhance the reader’s life. We also accept submissions from our visitors and will select the quotes we feel are most appealing to the BookQuoters community.

Founded in 2023, BookQuoters has quickly become a large and vibrant community of people who share an affinity for books. Books are seen by some as a throwback to a previous world; conversely, gleaning the main ideas of a book via a quote or a quick summary is typical of the Information Age but is a habit disdained by some diehard readers. We feel that we have the best of both worlds at BookQuoters; we read books cover-to-cover but offer you some of the highlights. We hope you’ll join us.