Part1 starts with AtomicInteger
Start with a relatively simple Atomic (java. util. concurrent is based on Queue and sends packets, while Queue uses Atomic operations in many cases, so it starts from here ). In many cases, we only need a simple,
I haven't written logs for a long time. Recently, due to project shortage, I am studying some Java reflection mechanisms. I want to use this mechanism to better improve and encapsulate the project and code. Today, when I am studying reflection,
Import java. awt. *; import javax. swing. *; public class SimpleFrameTest {public static void main (String [] args) {EventQueue. invokeLater (new Runnable () {// open a thread public void run () {SimpleFrame frame = new SimpleFrame (); frame.
Chapter 2 variables, data types, and operators:
1. Common Java data types:
Int is used to store integers, such as the number of students.
Double floating point is used to store decimal places such as the price of goods
The char character type is
Automatic packing and unpacking are a common issue in Java. Today we will take a look at some of the problems in packing and unpacking. This article first describes the most basic items of packing and unpacking, and then let's take a look at the
1. ArrayBlockingQueue
ArrayBlockingQueue is a thread-safe, bounded blocking queue supported by arrays. This queue sorts elements according to the FIFO (first-in-first-out) principle. This is a typical "bounded cache zone ",Fixed sizeIn which the
This blog continues to organize the topic tree based on some OJ questions. Will be updated one after another...
1. tree traversal
Tree definition: connected undirected graph without loops.
Example
1. Restoration of the POJ 2255 Tree Recovery
Two n-dimensional vectors. The point multiplication of a vector is to add the product of the corresponding dimension of the vector. However, we can get a smaller vector point multiplication under the vector dimension switch, for example, a
Learning without summarization is not counted as learning. This month's learning has gained a lot. Let's share it with you.
I. Classification of design patterns
In general, the design model is divided into three categories:
1. There are five
Learning Objectives
Maven plug-ins and targets;
Maven lifecycle and stages.
Preface
See execution in Note 1Mvn clean packageMaven automatically performs the compile and test operations.
Compile, test, and package belong to different stages of a
I. web project Integration spring
1.1 open Myeclipse, create a web project (eclipse is a dynamic web project), and use J2EE5.0.
1.2 Add the basic jar package for Srping (no transactions required)
Org. springframework.
Package test;/*** Implement the moving algorithm before and after the positive and negative elements of the array (the division line is 0 and can be any other number)* Move a negative number forward to the front of the array, and place a positive
5 inheritance 5.1 class, superclass, and subclass
Use super to access the parent class. Because the subclass cannot directly access the superclass private domain, the subclass must call the superclass constructor to initialize the superclass private
The iterator mode is symbiotic with the set. Generally, as long as we implement a set, we need to provide the set iterator at the same time, just like the Collection in java, list, Set, Map, etc. These sets all have their own iterators. If we want
1: inheritance relationship
A: Hashtable inherits from the Dictionary class to implement the map and cloneable interfaces.
B: HashMap inherits from the AbstractMap class to implement the map and cloneable interfaces.
HashTable:
public class
I. OverviewJava. util. concurrent has a very convenient thread pool implementation. The Executor framework provided contains the static factory methods for managing and implementing Runnable tasks. The Executors class provides various types of
1. Motivation and definitionIn factory mode, a factory can only provide one or more products. When there are many product types, a series of GUI controls (for example, we want to create cross-platform buttons, menus, text boxes, and so on) are
What is the responsibility chain model?
So that multiple objects have the opportunity to process the request, so as to avoid the coupling relationship between the request sender and the receiver. Connect the object to a chain and pass the request
There are two methods for determining the same in java:
First, use = to directly determine the same, which is suitable for comparison between two variables, one variable and one object.
For example:
int a=3,c=3;Integer b=new
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