edition : solutions for developing electronic products and embedded devicesJRE(Java Runtime Environment): java Runtime environment, including java virtual machines and java core class librariesJDK(Java development Kit): Java D
to minimize coupling
7, object-oriented common design principles: SOLID
Single principle of responsibility;
The principle of open closure;
Liskov substitution principle;
interface isolation principle;
dependency inversion principle;
Dimitri Law;
Synthesis/polymerization reuse principle;
Two1. Minimize access rights :From the point of view of information hiding, th
Introduction to common Collections in Java Collections Framework, their features, applicable scenarios, and implementation principles
JDK provides a large number of excellent sets for developers to use. Qualified programmers must be able to select the most appropriate set based on functional scenarios and performance requirements, this requires developers to be familiar with common
1. What is a Java transaction?
Generally, transactions are only related to databases.
Transactions must follow the acid principles established by ISO/IEC. Acid is short for Atomicity, consistency, isolation, and durability. The atomicity of a transaction indicates that any failure during the transaction execution will invalidate any modification made by the transaction. Consistency indicates that when t
garbage, and the objects that are copied into the new heap are arranged in a compact way.tag-sweep : Iterate through all references to find more surviving objects. When a surviving object is not found, it is tagged to the object, and no object is cleaned in the process. Garbage is not cleaned until all the marks have been completed.During the run of a Java virtual machine, if all objects are stable and the garbage collector becomes less efficient, it
A deep understanding of the implementation principles of HashMap in Java
HashMap inherits from the abstract class AbstractMap. The abstract class AbstractMap implements the Map interface. The diagram is as follows:
Map in Java
The interface allows us to use an object as the key, that is, we can use an object as the key to find another object.
Before discussi
Principles and usage of java Thread Pool
Multithreading is a very important technical point in both java and android development. For example, each item in listview has a download function. At this time, it is unreasonable to download a new Thread every time, this will definitely cause a huge loss to memory and performance. If several threads can be enabled, when
semicolon after it.3) How the JSP works (JSP is essentially a servlet)When the ①web container (servlet engine) receives a request for access to a URL with an extension of. JSP, it will give the access request to the JSP engine for processing;② Each JSP page is accessed for the first time, the JSP engine translates it into a servlet source program,The servlet source program is then compiled into a servlet class file, which is then loaded and interpreted by the Web container (servlet engine) in
know as little as possible about other objects.Basic idea: reduce coupling.g: the principle of synthetic multiplexingInstead of using inheritance, it is preferable to use a combination rather than an inheritance principle, which is to use the composition/aggregation method first.Basic idea: In taking advantage of the object's lowest point, the combination is preferred, not the inheritance, because any changes to the parent class can directly affect the behavior of the subclass.eg. To pack an el
Principles of lambda Expression Design and architecture for Java language Programming learning [figure]:As you all know, lambda expressions are a simple improvement to the Java language, and in the JDK standard class library, there are a variety of ways to run it. But most Java code is not written by the program Ape th
GC (Minor GC), older generation GC (Major gc/full GC)2, large objects directly into the old age:3, long-term survival of the object will enter the old age: Define an Age counter for each object. The object is moved to survivor space and the object age is set to 1 after Eden is born and survives after the first minor GC and can be accommodated by Survicor. Objects in survivor each "through" a minor GC, the age increases by 1, when the age increases to a certain extent (the default 15), promoted
Analysis of common JAVA data structures and principles
Not long ago, the interviewer asked me to explain how to understand the java data structure framework. I have also read some of the source code before. balabala has talked about a bunch of ideas and I will summarize them.
Three important interfaces and features of java
similar feature.whichUnsafe.compareandswapint (this, valueoffset, expect, update);Similar:if (this = = expect) {this = Updatereturn true;} else {return false;}So the problem is, the success process requires 2 steps: compare this = = expect, replace this = Update,compareandswapint How do these two steps atomicity? Refer to the principles of CAs.CAS principleCAS is implemented by invoking JNI code. Jni:java Native Interface is a
invoked by, nor does it know the policy of the calling thread to handle the interrupt. Therefore, after the task has set the thread interrupt tag, it is not possible to ensure that the task is canceled. Therefore, the following two programming principles are:
1 Unless you know the thread's interrupt strategy, you should not interrupt it.This principle tells us that we should not directly call the interrupt method of the Executer frame thread, and sh
In the previous Java 23, you learned about the singleton mode and Factory mode of design mode. Here, the design pattern is introducedPrinciple of object-oriented thought designIn the actual development, we want to understand the object-oriented thinking more deeply, we must be familiar with the design principles of the object-oriented thought that the predecessors have summed up.
Single principle o
str2 are pointing to the same object.String str1 =new String ("abc"); String str2 =new String ("abc"); System.out.println (STR1==STR2); //FalseThe new method is to generate different objects. Each time one is generated. For the code of string str = new String ("abc"), it is necessary to create new objects in the heap, regardless of whether their string values are equal or not, so that the burden of the program is compounded by the need to create new objects.When defining a class using a format
@override inside the retention set to source, compiled successfully do not have the information of these checks, on the contrary, @Deprecated inside the retention set as runtime, This means that in addition to being warned at compile time which deprecated method is used, it is possible to find out whether the method is deprecated when executed.3) @DocumentedInclude this note in the Javadoc4) @InheritedAllow subclasses to inherit annotations from parent class4.Use@Description (value= "instance u
IOS message push principles and implementation based on APNS (JAVA background), iosapns
Push principle:
The working mechanism of Push can be summarized
In the figure, Provider refers to the Push server of an iPhone software. In this article, I will use. net as the Provider.
APNS is the abbreviation of Apple Push Notification Service (Apple Push server). It is an Apple server.
It can be divided into three s
. Conversion of byte-stream and character stream1, from byte stream to character streams: InputStreamReader, OutputStreamWriter class can be implemented. 2, from character flow to byte stream: You can get char[] array from the character stream, convert to string, then call the API function of String GetBytes () get to byte[], and then you can pass Bytearrayinputstream,Bytearrayoutputstream to convert to a byte stream. The above knowledge is the foundation of Learning
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.