Objective
Learning Java has been a long time, the recent days of the author in the Java again to learn. But this stage of learning
I will not focus on the specific grammar of what the details of the things, this stage of the study of the author of
Initializing and cleaning
Initialization and cleanup are two issues that involve security. A large part of the error in the previous program originated from improper initialization and cleanup. In Java, there is a series of initialization mechanism
1. Method overload provisions
Analysis:
The Java overload resolution process is divided into 2 steps:
(1) According to the actual election to take all applicable.
(2) to obtain the most accurate according to the form election. (no arguments are
In the API this is the way to describe the semaphore
Semaphore is typically used to limit the number of threads that can access certain resources (physical or logical).
A number of counting signals. Conceptually, the semaphore maintains a license
Java native enum No way to specify the value of a member like an enum in C, in some C language directly with the Java communication scenario will be more cumbersome, so I extended the original Java enum to achieve the purpose of arbitrarily
It all starts with a weird piece of code, which is said to be an error that the Java programmer would make, as follows:
Class Singleton {public
static Singleton Singleton = new Singleton ();
public static int A;
public static int b = 0;
These two days accidentally saw a park friend blog to achieve Path2.0 in the gorgeous rotating menu, feel good, but found that the author does not deal with thread safety issues, so here I fixed, and improve the next part of the function. The
CataloguePreface: What is JDBCI. Preparatory work (i): MySQL installation configuration and basic LearningIi. preparatory Work (ii): Download the jar package for the database and import itThird, JDBC Basic operation(1) Define the class of the record
First, the characteristics of quartz* According to the operation of the inheritance of the way to divide, mainly the following two kinds:1. How the job class inherits the Org.springframework.scheduling.quartz.QuartzJobBean class2. How the job class
We all know that the member functions of the classes in C + + provide the this pointer by default, and in non-static member functions, when you call a function, the compiler will "automatically" help you add the this pointer to the function
This article is just about the process, using a very simple packaging encryption method, as to what kind of encryption results, please follow the requirements to modify, byte offset, inversion plus algorithm can be, but generally need not be so
In unicast mode there are server and client points, and the multicast mode is different from unicast mode, each end is a router or switch as a relay station, either end of the router or switch to send messages, routing or switch responsible for
Stability (stability)A sort algorithm is stable, when there are two equal records of the keywords R and S, and in the original list R appears before s, in the sorted list, R will also be before S.
Sorting algorithm classification
Common inserts
Creating ThreadsA thread represents a separate execution flow that has its own program execution counter and has its own stack. Below, we create a thread to establish a visual sense of threads, in Java to create a thread in two ways, one is to
An inner class is a class that is redefined inside an outer class. An inner class exists as a member of an external class and is attached to an external class.Inner classes can be static, available with protected and private adornments (while
As a result of doing homework, get acquainted with Java Biginrger class. Reading and reading, more and more interesting. Later homework finished, also can not bear to leave it, simply put all the code to study again.At the beginning, a morning time
Job 10-exceptiontags (space delimited): Java1. Study summary 1.1 This week summarize anomalies in the way you like (mind mapping or other).2. Written workThis PTA job problem set anomaly1. Common exceptionsCombined Topic 7-1 Answer1.1 What
Import Java.util.Random;
public class Statictest {
private static int data = 0;
public static void Main (string[] args) {
//Open three threads for
(int i=0;i
Run Result:
Thread-1 has put data:367396051Thread-2 has put
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.