I. Overview of new Java IOThe input and output streams in the Javaio are handled through byte movement, and the stream-oriented input-output system can handle only one byte at a time, so it is inefficient and the traditional input-output stream is blocked, meaning that when the data is unreadable, the current thread is blocked until it is read to a valid data to continue running.After java1.4, a series of improved input and output classes and methods
The core of Java is Object-oriented (fully object-oriented)Object-Oriented ProgrammingYou have to be clear about the three main features of the object1. Behavior of the object2. The state of the object3. Object identificationIn addition, it is necessary to understand the relationship between objects more common relationships haveDependency Inheritance AggregationIn Java
API for the JDBC interface core Java.sql.* and javax.sql.* (java2.0 later updated extensions) |-Driver Interface : Represents Java driver interface. All of the specific database vendors are going to implement this interface. |-Connect (URL, properties): a way to connect to a database. URL: The URL of the connection database URL Syntax: jdbc protocol : Database Sub-protocol :// host : Port /
that determines the elements participating in the comparison. for (int x = 0 ; x 1 ; X + +) {for (int y = × + 1 ; Y //to determine the previous one greater than the next, the position is replaced. if (Arr[x] > Arr[y]) {swap ( Arr, x, y); } } } } Bubble sort: ?? The No. 0 and the first comparison, if the No. 0 large and the first swap position, the first and second comparisons, the large back shift, the second and third comparisons,?????? And so on,
:" + gradefield.getint (student)); (Exception e) { e.printstacktrace (); }20}(2) Gets the public property defined in the current class and parent classTo get all the public properties defined in the current class and the parent class can call the GetFields function of the class object, and to get a specified public property, you can call the GetField method, as shown in the following code:private static void Showfields () { Student Student = new Student ("Bill"
The more efficient Java threads have always been, and then know the efficiency of execution and CPU core number, today we tried the multi-core CPU under multithreading calculation:
This machine i5 four cores, opens 1, 4, 10, 20, 40, 100, 400 threads to do 100W times respectively, the result is as follows:
All tasks completed, total time consuming: 38368ms,thr
. 245 page71 Video 8.6 Viewer mode for linkage Scenarios 8.4.3 page No. 25172 Video 8.7 Applying a dependency reversal principle can reduce the range of changes affected 8.5.1 No. 254 page73 Video 8.8 A single responsibility principle that can keep classes as stable as possible 8.5.2 No. 256 page74 Video 8.9 The Richter replacement principle to follow when inheriting 8.5.3 No. 257 page75 Video 8.10 Optimizing inherited usage scenarios by using the synthetic Multiplexing Principle page No. 261 of
Tag: Util indicates date () Date class specifies date standard int ringIn the Java core Technology volume, the first date class appears in a very high frequency, so we have a small integration of the date classThe date class has twoThe date class represents a specific time classThis constructor assigns a Date object and initializes it to represent the specified number of milliseconds because it is called th
Book: "Java Core Technology Vol. two advanced features 9"Time: 2017.9.4-17:131. FlowInput stream: An object from which a sequence of bytes can be read; abstract class (InputStream)Output stream: An object to which a sequence of bytes can be written; abstract class (OutputStream)Source of the stream: file, network connection, memory block.Byte-oriented, so it is inconvenient to process Unicode information (m
Well known in. NET, the key generated by the RSA class is in XML format, while other languages such as Java generally use the PKCS8 format key, JavaScript generally uses the PKCS1 format. We in the development process is likely to encounter the need to interface with other languages developed API, if we encounter RSA encryption and decryption, we must ensure that key is the same, in order to ensure the correct processing of data, we definitely need to
Java naming convention: The first letter lowercase, the first letter of the following word, the camel's name.Be aware of the label:typealiases> in the label properties> below.Four, mapper mapper :1) Resource way:1 "account.xml" />2) class mode:1 class="jd.com.proxydao.AccMapper" />Specification Requirements:1:mapper files and interfaces need to be under the same package.The name of the 2:mapper mapping file needs to be the same as the name of the int
API for the JDBC interface core@author IxenosJava.sql.* and Javax.sql.*|-Driver Interface: Represents the Java driver interface. All of the specific database vendors are going to implement this interface.|-Connect (URL, properties): A way to connect to a database.
URL: The URL of the connection database
URL syntax: JDBC Protocol: Database Sub-protocol://HOST: Port/Database
User: Username fo
asvalues = Size.values();Returns an array containing the element size.small,size.medium,,size.extra_large.(4) The Ordinal method but the position of the enum constant in the enum declaration, where the position is counted from zero, for example Size.MEDIUM.ordinal () returns 1.7. Techniques for succession design(1) Placing public operations and domains in super-class(2) do not use protected domainsThis is because, first, the collection of subclasses is unrestricted, and any one can derive a sub
, the algorithm converts each character using 1-4-byte encoding.Code point/code unit (JDK 5.0)
A code point is a code value (Unicode encoding) that corresponds to a character in an encoded table.In Java, the char type describes a code unit with UTF-16 encoding.UTF-16 uses a different length of encoding to represent all Unicode code points . In the basic multilingual plane, each character is represented by 16 bits (often referred to as a unit of
A termJdk:java delelpment JitJre:java Runtime EnvironmentSecond, installation jdk1.8.0_25Setting environment variables (recommended to be installed directly under C-drive), using;C: \java\jre1.8.0_25\bin;Third, unzip the source file methodEnter C: \java\jre1.8.0_25Create SRC subdirectorymkdir SRCCdsrcUnzip the fileJar XVF. \src.zipI. Using command-line toolsJava Helloworld.java with
1. three main features of the process:Independence: With its own independent address space, a process cannot directly access the address space of other processes.Dynamic: is a collection of instructions that are active in a system.Concurrency: A single process can be performed concurrently on multiple processors, with no impact on each other.2. Differences in concurrency and parallelism:Parallel is the same time, there are multiple instructions on multiple processors at the same time, concurrenc
Java core --- AnnotationAnnotation is a new feature in jdk 5 and later versions. Spring and Hibernate frameworks provide annotation configuration methods. This article describes the annotations in the middle of the wave breeze and mainly explains the usage of jdk built-in annotations, the declaration and definition of annotations, as well as the usage of custom annotations are at the beginning, to say a lit
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.