I have always felt that the official Java document is a bit messy, recently deliberately collated, for reference only.EntranceOracle Official Documentation Portal: http://docs.oracle.com/. The subordinate page this side only organizes the Java EE
Access permissions for Java Classes 1. ParsingJava has four access rights, three of which have access modifiers, private,public and protected, and one without any modifiers.
The narrowest modifier for access restrictions in the Private:java
Reference: In-depth understanding of Java Virtual machines: JVM advanced Features and Best Practices (2nd edition)The term "memory model" can be understood as the abstraction of read-write access to a particular memory or cache under a specific
Java socket technology is divided into server-side socket:serversocket and client Socket:socketServerSocket and Socket Communication mode:Service side:1, ServerSocket listening port, call accept () to create a socket, and wait for the client's
(1) daemon must be set before thread start(2) The daemon thread terminates after all user threads have finished.(3) because (2) all daemons cannot perform some read and write operations, because if the daemon thread is performing read and write
The first part computer program and object-oriented programmingType of programming language:Machine language: 2 binary (0 and 1)Assembly language: Abbreviations and mnemonics for English charactersAdvanced Language:Process oriented: process-oriented
All learning is a process---- learning rules, applying rules, innovating, breaking rules . When we meet new things, we have a holistic understanding of him and a general plan of the way forward, which is a holistic approach and a means of unlocking
Chang: specifically for managing some of the data that is determined at compile time and saved in the compiled. class file, including: About classes, methods, constants in interfaces, and string constants.String s1= "Crazy Java";//s1 directly refers
Java outputs the string in reverse recursion Mode
Recently I found a question about how to recursively output strings:
For example, set the string "hello world my friend and now" --> now and friend my world hello
There are many ways to achieve this,
Java State mode)State: different states and actions; or, each State has a corresponding action. When to use the State mode, the State mode is usually used in actual use. It is suitable for "status switching ". Because we often use If elseif else for
USACO--1. 1 Greedy Gift Givers + Simulation
Simple question simulation. Note that 0% 0 is an invalid operation.
The Code is as follows:
/* ID: 15674811 LANG: C ++ TASK: gift1 */# include
# Include
# Include
# Include
Sub-governance strategy (Merge Sorting, binary search, n of x, onacci series, Strassen matrix multiplication)
The MIT open course Introduction to algorithms is indeed much more interesting than reading books. Lesson 3 divide and conquer, which
Design Model-factory ModelStart with reality
Remember what I mentioned earlierSimple factory Mode?It still needs to be used in the client (main ).AnimalFactory.getAnimale(0)To select the animal type, when the new animal type is addedAnimalFactoryTo
Basic tools-single-piece Mode
As the single-piece mode in the C ++ design mode belongs to one of the Creation modes, there are still many opportunities for "appearance" in the software design process, the following source code is a summary of the
Synchronized in java
1. synchronized is mutually exclusive. This keyword can declare methods or code libraries.
import java.util.concurrent.TimeUnit;public class SynchronizedDemo1 {public synchronized static void synchronizedDemo(){ try
Volatile and Atomics in javaVolatile
Volatile ensures the visibility of variables in multiple threads. Used to modify variables.
The Code is as follows:
Public class VolatileDemo1 {volatile int a; public int getA () {return a;} public void setA
Introduction and use of java Thread Pool
The efficiency of using a thread pool is much higher than that of a single thread under operations of the same magnitude. The thread pool can reduce the overhead caused by thread creation. After the threads
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