effective java second edition

Read about effective java second edition, The latest news, videos, and discussion topics about effective java second edition from alibabacloud.com

Effective Java item7:avoid finalizers, explains why finalize is unsafe and does not recommend using

My previous blog:System.GC () and-XX:+DISABLEEXPLICITGC startup parameters, and Directbytebuffer memory release when discussing how to reclaim out-of-heap memory, mention "NiO in direct The release of memory is not through Finalize (), because finalize is unsafe and affects energy ". Effective Java is also mentioned in the book: Avoid finalizers. People have a latent sense of rebellion, others give the conc

Just five minutes to finish reading effective Java

Effective JavaCreating and destroying objects---consider replacing constructors with static factory methodsconstructors are the most basic and most common way to create an object instance, most developers use a class, the first thing to consider is how to construct and initialize an object example, and the way to construct the first consideration is to do through the constructor function, So the first thing to focus on when looking at a document in Ja

Effective Java creating and destroying objects

Effective Java reads notes and refines the contents of the book in a way that suits its own understanding. "Effective Java" is a very useful book, reading methods should be quick to understand, summarize, and then apply. Rather than, a word one word to scrutinize, study. So, nerds are generally very xx, in my eyes.Made

Effective Java-Consider the builder (Builder) when encountering multiple constructor parameters __java

This article is "effective Java" Reading notes, because it is a Java advanced book, it is inevitable that there will be an understanding of the deviation, if there is a mistake, very welcome to criticize, I am greatly appreciated. What is a builder (Builder), a classmate who has been interviewed may have been asked to distinguish between string and StringBuffer a

"Effective Java"------after reading summary

"Effective Java"--a summary after readingThis book is quite famous in the Java development industry. Today is finally a cursory reading ... The later thread part and the serialization section are not carefully seen due to the impatient gas mania. There is a week left in this month, and the digest is slowly summed up.1. Static Factory method instead of constructor

Effective java-Reading notes-Chapter III methods that are common to all objects

Personal blog Sync release: Effective java-Reading notes-Chapter III methods that are common to all objectsChapter III methods that are common to all objectsAll non-final methods (equals, Hashcode, toString, clone, Finalize) have explicit general conventions because they are designed to be overwritten, if not adhered to, a hash-based collection (HashMap, HashSet, HashTable) may not work together with this c

Effective single-instance mode and serialization of Java notes

Singleton mode: "A class has and has only one instance, and self-instantiation is provided to the system as a whole." ”There are a number of ways to implement a singleton pattern, such as lazy mode (and so on when the time is instantiated), a Hungry man mode (class loading is instantiated), and so on, here with the A Hungry Man mode method implementation, that is, class loading on the instantiation, a single case pattern application scenario has many, such as an application has a window interfac

Effective Java Chinese version reading summary

Click on the link to see the original cloud notes spent half a day, greedy chew Read effective Java this book (although famous for a long time, but seldom read) turned over a kind of eating and sleeping feeling, work left to stay to read a special, and then simply take home to see. The following is a summary of the content, Mainly for the personal feeling useful, there is a large number of not mentioned, be

Effective Java-consider replacing constructors with static factory methods

correct.Although we can solve this problem through a composite approach (composition), the two classes are not is-a relationships. The nature of the static factory approach is still a static method, and he does not have a particular standard.We cannot specifically identify a static factory method in the API documentation (perhaps by adding a standard annotation?).When I want to find a way to instantiate a class from the API, it is still not intuitive relative to the constructor.Although the

"Effective Java" learning notes-accumulation and motivation

. Without the boss's previous reminders, I'm afraid it's hard to think of the reason for this (especially if the fault cannot be reproduced locally and the error data cannot be tested with breakpoints). Young man, as a novice, good accumulation of experience, later to do the work will become more and more handy. At the same time, if it takes a lot of time to solve a problem, ask your mentor or a colleague who is more experienced than you are asking for help. After a few days the task is not so n

"Effective Java" reading notes-minimizing the variability of classes

Item 15 The variability of the minimized class Effective Java How do I make a class immutable? Does not provide a way to change the state of an object. (mutators) Ensure that the class is not inherited, that is, the class is qualified with final. Make all fields (field) final. Make all the domains private. Ensure all mutually exclusive access to the mutable component (

Effective Java reading notes creating and destroying objects

Today just began to read effective Java, the Chinese version of the reading is very awkward, but feel a lot of harvest.In addition, the content of this book is for Java 1.5 and 1.6.Here's the 2nd Chapter: Creating and destroying the contents of an object.First: Consider replacing the constructor with a static factory methodThis article is intended for scenarios w

Effective Java Directory

"Effective Java" catalog excerpt.I know it looks bad. In the present, the lack of actual operation, can only temporarily extract the directory. With the increase in practice, fill in more examples slowly.Chapter 2 Creating and destroying Objects Consider static factory methods instead of constructors Consider a builder when faced with many constructor parameters Enforce the Singleton proper

The 7th chapter of the effective Java method

annotations, Package-info.java can (but is not required) include package declarations and package annotations.Javadoc the ability to have "inherited" method annotations. If the API element does not have a document comment, Javadoc will search for the most applicable document comment, and the document comment of the interface takes precedence over the document comment for the superclass.You can also inherit portions of a document's comments from a superclass using the {@inheritDoc} tag. This mea

Java experience (1. Postfix mail delivery performance and effective delivery issues)

corresponding domain name queue, send and update the last send time of the changed domain name.2. Unlock the domain to send records.In this way, the non-blocking queue is used for message queue, which improves the concurrency of the system.It seems to solve the problem, but it was blacklisted by some service providers.The system is then analyzed as follows:This is a typical producer-to-consumer issue in which Java client-produced messages are timed t

Effective Java enum class

With the effective Java this book to see more and more, found in peacetime use of Java made a lot of obvious mistakes, they usually know a little but the lack of use is also more and more.As for enumeration classes, the suggestion in the book is to replace the traditional static constants with enumeration classes, usually, if a class of data is represented by a d

Effective Java--> (i) Creating and destroying objects

Create | objects Effective Java Learning notes the Java language supports four basic types: interface (Interface), Class (Class), array (array), and primitive type (primitive). The first three types are often referred to as reference types (reference type), instances and arrays of classes are objects (object), and the values of primitive types are not objects. A

[Reading notes] Effective Java Chapter Fourth

policy with a function objectIn Java, where there is a similar set of sequencer, the Sequencer object only represents the strategy of sorting, such instances of the class is functionally not different, mutual equivalence, suitable as a singleton, saving unnecessary object creation overhead.prioritize static member classesStatic member classes are the simplest kind of nested classes. If the member class does not require access to the perimeter instanc

Effective Java-Avoid using finalizer

JNI calls.These JNI methods is coded in C or C + +. They do the actual work, interacting with a native label.Let's look at the figure.You can see this AWT components provide a universal public API to the application by AWT component class and AWT peers. A Component class and its peer interface is identical across platform. Those underlying peer classes and JNI codes are different. ) In addition, finalizer chaining was mentioned. The subclass constructor automatically calls the parent class con

[Effective Java Reading notes] Chapter II Creating and destroying objects sixth-? Reviews

Sixth elimination of expired referencesThere will still be memory leak in Java, such as a stack growth and contraction, then the object pops from the stack will not be garbage collected, the immediate use of the stack of the program no longer reference these objects. This is because the inside of the stack maintains outdated references to these objects (which are never dismissed) and needs to be shown to empty (null) the objects and tell the garbage c

Total Pages: 15 1 .... 6 7 8 9 10 .... 15 Go to: Go

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.