guidelines for using atomic packages in Java
This paper starts with concurrent network, author: Fang Fei Introduction
Java from the JDK1.5 began to provide a java.util.concurrent.atomic package, to facilitate the programmer in a multi-threaded
Creating thread classes by inheriting the thread class implementing the Runnable interface creating a thread class using callable and future creating threads comparison of three ways to create multithreading with the implementation of the
"1"
At the level of programmers: do some static interface;Programmer: Do some additions and deletions to check the small module;Intermediate programmer: To do logic more complex module;Senior programmer: do core module;Project Manager: The overall
--------------------------------------------------------------
Haven't updated the blog for a long time, today to a.
--------------------------------------------------------------
0x00 Introduction The Java RMI service is a remote method call
Understanding Java Polymorphism
Author: mienflying Date: 2006-08-19This article from Blogjava, I found that the author of the original Flyingis write very well, very in place, turned over, he was lazy to write ... Thank you for that.
These days I
Test thread deadlock, run the following code:
public class Test1 {
private static Object O1 = new Object ();
private static Object O2 = new Object ();
public static void Main (string[] args) {for
(int i = 0;ipublic void Run ()
1. SOURCE Analysis Topics
Detailed introduction of the source code used in the classic design idea, to see how Daniel is writing code, improve the technical aesthetic, improve the core competitiveness.
To help you find the source of
1. Implement Runnable interface
Synchronizing code blocks
Use the Synchronized keyword to synchronize the declaration of a block of code, but when you use this operation you must explicitly indicate which object is to be locked, typically based on
Performance Comparison
In JDK1.5, synchronized is inefficient. Because this is a heavyweight operation, its greatest performance impact is the implementation, suspend the thread and recover the thread of the operation need to go into the kernel
In the field of information security, authorization is the center of the world because it is the process of controlling the access of individuals, processes, and computers to system resources. Until recently, the question associated with the Java
Java memory can be divided into: heap and meta space. To View the heap:
Jmap-heap PID
View Metaspace:
Use JSTAT-GC pid mc Mu. to view other uses in the process:
The RS occupancy in top is minus the footprint in the jmap-heap.
/proc/$PID/maps Smaps
Maybe you've been learning Java for so long, but if someone asks you what is a Java EE. How would you answer him? Let me talk about Java EE related technology. (Personal opinion only)
When we talk about Java EE, we first take a look at the platform.
1: "Byte" is byte, "bit" is bit;
2:1 byte = 8 bit;
Char is 2 bytes in Java. Java uses a unicode,2 byte (16-bit) to represent one character.
The example code is as follows:
public class Test {public
static void Main (string[] args) {
String
I believe many comrades have also thought of their own to write a browser (or a Web page) embedded in their own written form, but the hateful is not provided in the Java class, Java, there is a call Editpane control, can be implemented to open some
Servlet Common Interface:
1, the servlet implementation Related:
(1) Servlet interface: Primarily defines the lifecycle method of the servlet, which defines the following methods:
L init (servletconfig config) is used to initialize the servlet
L
Java programming common "pit" summary (next)
30. Misuse of List
It is recommended that the following scenarios replace the list with array:
1.list length fixed, e.g. every day of the week
2. Frequent traversal of the list, such as over 1w times
3.
/** For Java programs, as long as there is a foreground thread, then the process is not finished* If there is no foreground thread or all of it is a background thread, then the process ends* Set a thread to be a background thread setdeamon (true);
Java face test-Basic Article Five
41, A.hashcode () what is the use. What is the relationship to A.equals (b).The Hashcode () method corresponds to the hash value of the integral type of the object. It is commonly used in hash based collection
1) Select Pieces
✔️
2) Painting pieces
✔️
3) Judging the outcome
Goal
4 Exchange Line Chess party
We have already painted the board, the pieces and can be free drop, then the function
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