General principles of Design patternsI. Overview1, what is the design modeDesign Patterns are a set of reusable, most known, categorized purposes, code design experience Summary. Explained below:Classification and cataloging : it is said that some
These two days have encountered some problems in packaging a Java project into an EXE file, and now write down these problems and solutions.1, the background image cannot be displayed when using Java Swing as the front endSolution: Convert JPG
1. Thread Insecure HashMapThe code in this section is based on the JDK 1.7.0_67HashMap is non-thread-safe,hashmap thread insecurity is mainly reflected in the dead loop at resize and Fast-fail when using iterators. 1.1 HashMap Working principle 1.1.1
One, buffer flow:Java provides a buffer stream, which can improve the read and write speed of Io stream .Buffer stream, according to the classification of the stream is divided into: byte buffer stream and character Buffer stream .Two, byte buffer
1. Common Design PatternsSingleton mode: Lazy, a hungry man, double check lock, static load, internal class loading, enumeration class loading. Ensure that a class has only one instance and provides a global access point to access it.Proxy mode:
1.1creation of collectionsTo create a common format for a collection:Guide Package:import java.util.ArrayList;To create an object: is identical to other common reference data types, but specifies the type of data stored in the container:
Java package, in fact, is the folder in our computer system, the package is stored in the class file.When the class file is very large, we usually use multiple packages to store and manage them, which is called subcontracting management.In the
Thinking?1 Why use actuators and thread pools?2 What are actuators and threads? How to useActuatorThread executor separates the creation and execution of tasks, improves the performance of threadsThread poolAvoids the frequent creation and
ObjectiveAn overview of the principles and classifications of design patterns has been introduced before. Today to open the design mode of learning, the first thing to introduce is the factory model, in the introduction of Factory mode before the
Execution order in a class:static variablesStatic code blockcode blockConstruction methodSubclass and Parent class execution order:Parent class static variableParent class static code blockSub-class static variablesSub-class static code blockParent
Queue CollectionWhat is a queue collection?A: Queue isused to simulate the data structure of a queue. Queues are usually "FIFO" containers. The head of the queue is kept in the queue for the longest-held element, and the tail holds the element with
ChatWork almost a year, feel the work of a good thing also have a little, but there is a kind of not transparent feeling, check a problem, can find a pile of things do not understand.Before the new document is a record point drops of knowledge, the
Observer Pattern also called publish-subscribe-mode, model-view-mode, source-listener-mode, or slave mode. The Observer pattern defines a one-to-many dependency that allows multiple observer objects to listen to a Subject object at the same time.
1 Public classDemo6_date {2 3 /*4 * A: class date indicates a specific moment, accurate to milliseconds5 * B: Construction method6 * Public date () No parameter represents the current time7 * Public date (long date) when parameters are passed
1. What is a collection? 1.1 Overview of the Java collection: On the one hand, object-oriented language to the embodiment of the object is in the form of objects, in order to facilitate the operation of multiple objects, it is necessary to store
Although there are a lot of similar articles on the Internet, the first time to take a look at the online article, but in order to make a record, I also write, record a bit.First is to install JDK,JDK download can go directly to the official website
RabbitMQ based on Erlang implementations, clients can use Python | Java | Ruby | PHP | C # | Javascript | Go and other languages to implement. Here's a test of the Java language.Install the RABBITMQ server first.Maven Dependency com.rabbitmq
1. Introduction to ExceptionsThe abnormal mechanism can improve the robustness and fault tolerance of the program.Throwable:throwable is a superclass of all errors or exceptions in the Java language. There are two sub-classes of error and exception.1
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