Unit Test BasicsToday's software testing is very prevalent, I through the project practice and personal experience to talk about unit testing, I have been adhering to the "principle of using Code", but also hope that individuals can give valuable
One feature of Java has been canceled is "conditional compilation" of C, which allows us to change parameters, get different behaviors, and not change any other code. Java's abandonment of this feature may be due to the fact that the feature is
About the pseudo-share of the article has been many, for multithreaded programming, especially the multi-threaded processing lists and arrays, we should pay great attention to the problem of pseudo-sharing. Otherwise, not only can not play the
ARouter works with Fragment: "Fetch fragment instance error" to handle exceptions. arouterfragment
In the current project, ARouter is used to handle redirection and data transfer requirements in componentized development. It has been used smoothly.
Java programming ideology (15th)-reflection of type information
After talking about. class and Class, continue.
1) generalized Class reference
Class can also be added to the generic type, and the type check will be performed after being
The previous sections mainly talk about atomic operations. As for some problems or traps related to atomic operations, they will be explained in the final summary. Starting from this chapter, we will spend a small amount of time talking about the
The previous chapters mainly talk about atomic operations, as far as the questions related to atomic manipulation or traps are put in the final summary. This chapter begins with a small amount of space to talk about locking mechanisms.The lock
Atomicinteger can be seen as an atomic manipulation tool class for integer classes. Under the Java.util.concurrent.atomic package, in some use cases can replace the lock operation to improve concurrency. The following is a few things to introduce:1.
Camera definitionIn the game, the camera is used to show the scene to the user, and the camera is like a camera, and the scene in the camcorder is the camera's display range, as shown in:In 3D space, the camera is defined as a position with a unit
Android research-Game Development camera updateZookeeper
Introduction to the principle of cameras in games
Updating the camera position in game development determines the content displayed on the screen, especially the RPG Game camera, for example,
2. getter and setter methods used to obtain and set Socket optionsThe Socket option specifies how the Socket class sends and accepts data. In JDK1.4, a total of eight sockets can be set. These eight options are defined in the java.net. SocketOptions
(i) Sub-section buffer stream(1) It is more efficient to read one byte array at a time than one byte at a time.Reading one byte array at a time is equivalent to constructing a buffer, and is there a more efficient flow than reading one byte array at
Setscale the precision of the numerical value of the BigDecimal type.
Public BigDecimal setscale (int newscale, int roundingmode) {
...
}Newscale retains the number of bigdecimal digits. Roundingmode has the following processing modes:
Automatic unboxing of basic data and the mode of sharing meta-design
1.1 Automatic Boxing
An integer between -128~127, mounted in an area of memory.
Integers that exceed this range are installed in different memory areas.
Before we understand the structure of the JVM, it is necessary to understand the basic memory structure of the operating system:JVM in the operating system Why is the memory of the JVM distributed in the heap of the operating system?? Because the
Atomicinteger, a class that provides an integer for atomic operations. In the Java language, ++i and i++ operations are not thread-safe and will inevitably use the Synchronized keyword when used. and Atomicinteger through a thread-safe addition and
The properties files are often read in daily use, and some of the Java read properties that you collect online are summarized as follows:
1, using the Java.util.Properties class of the load () method
Such as:
InputStream is = new
1.JDBC Connection database to add a Mysql-connector-java-5.1.38-bin.jar library2.ODBC connecting the database to add an ODBC data source3. Test codeDbhelper.java Code JDBC Connection DatabaseImport java.beans.Statement;Import
The two situations I want to analyze are related to static and final modifiers ~
1) static
Static modification methods cannot be overwritten, and final modification methods cannot be overwritten.
2) Final
Because the visibility of private and
Atomicinteger, a class that provides atomic operations. In Java, the ++ I and I ++ operations are not thread-safe. When using them, the synchronized keyword is inevitable. Atomicinteger uses a thread-safe addition/subtraction operation
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.