How 1.java is managing memoryThe memory management of Java is the allocation and release of objects. (which includes two parts)Allocation: The allocation of memory is done by the program, and the programmer needs to request memory space for each
1.java Garbage Collection processThe root search algorithm (GC Roots tracing) is used to determine if an object is alive.The basic idea of this algorithm is to use a series of objects called "GC Roots" as the starting point, starting from these
We need to download the Protobuffer first, here:Https://code.google.com/p/protobuf/downloads/listNote that you need to download two, one is complier, the other is source code (i downloaded the 2.5 version);complier corresponding Protoc.exe copy to
Java introduces the concept of a package to restrict the namespace of a class name to within a package, so you cannot have a class with the same name in a package
The import statement can not only locate the class, but also introduce the class's
The following code is not compiled in Java:public class Unreachabletest {public static void main (string[] args) {while (true) {}system.out.println ("aaaaaa");}}This code does not seem to have any syntax errors, but it is very obvious that this code
1, static means "global" or static meaning. It is used to modify member variables and member methods, or to form statically static static code, and member variables and member methods that are modified by static are independent of any object of that
Two methods
A URL to get the page source code geturlcontentstring, the other one from the source code to get the desired address fragments, which need to use regular expressions to match
the process of getting the Web source code:
A class defines a new data type, which defines a logical framework that defines the relationships between its members. This type can be used to declare an object of that type, by instantiating the object with the new keyword, that is, allocating the
Comparator is an interface that overrides the two methods of compare () and Equals () for the parity function, or, in the case of NULL, the default order of the elements, such as A,b,c,d,e,f,g, which is a,b,c,d,e,f,g in this way, of course the
Reentrantlock is a new class that JDK5 joins, and its usage is similar to synchronized. It requires the programmer to manually add lock and unlock code.than the benefits of synchronized. It adds two methods:L provides Trylock () when the method is
Maven multi-Environment configuration (simplified version, to be improved), maven
In the company's development environment, real projects need to be configured with multiple sets of environment configurations, such as development, testing, and
Java connects to the Turing robot to achieve chatbots and java access
A lot of people have played it, and there is a function of chatting with robots:
This Turing robot website provides related API interfaces that can be used in programs. The
Greedy algorithms solve coin seeking
If a currency has a coin with a nominal value of 1 cent, 2 cent, 5 cent, and 1 cent, how many coins are needed to find the change with K cent?
According to the greedy algorithm, we need to constantly use coins
Shiro simple authorization Principle AnalysisShiro authorization Overview
ShiroAuthorization can be divided into two types:Coarse-grained: writes directly to the code and binds the role. Fine-grained: what is written in the Code is the binding of
Java parameter passing and Memory Allocation ProblemsThis article can be used as a learning note for the Beijing shangxue java course.See the following code.
Class BirthDate {private int day; private int month; private int year; public BirthDate
ReentrantLock in java
ReentrantLock is a new class added to JDK 5. Its usage is similar to synchronized. This requires programmers to manually add the lock and unlock code.
Compared with synchronized. It adds two methods:
L provides tryLock () when
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