pointer exception when the value is unboxing if the key does not exist get returns nullint count = Counts.getordefault ("A", 0);//Recommended UseThe counter, when present, adds one:Counts.merge (Word, 1, integer::sum);If the word key does not exist before, connect Word with 1, or use the Integer::sum function to add 1 to the previous valueP243 Map Method! I didn
environment, we need to understand two points: 1.JRE 2.JDK!
JRE: it is a JAVA Runtime Environment, including JVM (Java Virtual Machine (JAVA Virtual Machine) and core class libraries required by JAVA programs. If you only need to
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
, 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 represente
child class is placed in the parent class object, and only methods of the parent class can be called. 1 Employee empl = new Manager () 2 Empl.setbonus (100); // compile error, no Setbonus method in parent class 3 4 // You can convert a parent class reference to a subclass reference 5 if (empl instanceof Manager) { Span style= "color: #008080;" >6 Manager Mgr = (manager) Empl; 7 Mgr.setbonus (100 8 } When a method is declared final,
The theoretical knowledge is boring, but these are basic skills and may be forgotten after learning. However, when used, we will find that the previous learning is very meaningful, and the learning thread is like this. 1. how to Create a lock? Lock lock = new ReentrantLock (); 2. How to Use the Lock? See the Lock document. The format is as follows: class X {private final ReentrantLock lock = new ReentrantLock ();//... public void m () {lock. lock ();
In Java, every variable, constant is a type.variables :Example: int i;Double A;1 The variable name must be a sequence of alphanumeric characters beginning with a letter. But unlike most programming languages, the range of letters and numbers in Java is larger, and the letters include ' a ' ~ ' Z ', ' a ' ~ ' Z ', ' _ ' or any Unicode character that represents a l
Java core programming-IO stream Overview (-), javaio
1. Four most critical parent classes of java io streams
~ InputStream (input byte stream)
~ OutputStream (output byte stream)
~ Reader (input stream)
~ Writer (output streams)
All the above four classes are public abstract class classes.
InputStream and Output
?
2. In-depth understanding:
(1) For all objects of the same class, the behavior of the object is defined by a callable method because it supports the same behavior and has familial similarity.
(2) Each object is stored, describing the current characteristics of the information, this is the state of the object, the state of the object changes, will change, but generally not spontaneous, the change of the state of the object must be impleme
The following is a list of videos related to this book, which will be updated dynamicallyChapter I.1 Video 1.1 The differences between JDK and JRE and JVM, install Java Development Environment 1.1.1 2nd page2 Video 1.2 Writing the first HelloWorld program 1.1.2 2nd page3 video 1.3 Developing slightly complex programs with function calls 1.1.3 5th page4 Video 1.4Debug Program 1.1.4 5th page5 video 1.5 Input
methods and properties, and dynamically invokes the functions of methods and properties , called the Java Reflection mechanism.2. Reflection mechanism what it can doThe reflection mechanism mainly provides the following functions:1: At run time, determine the class to which any object belongs.2: Constructs an object of any class at run time.3: At run time, determine the member variables and methods that an
Why is the use of volatile lower than the cost of synchronization?
The cost of synchronization is mainly determined by its coverage, and if you can reduce the coverage of synchronization, you can significantly improve program performance.
And volatile's coverage is variable-level only. Therefore, its synchronization cost is very low.
What is the volatile principle?
Volatile's semantics, in fact, is to tell the processor, do not put me into working memory, please directly in main memory opera
1. Serialization of objectsThe process of converting an object to a byte form is object serialization. Serialization also has a name of serialization, the serialized object is then deserialized after the resulting object, and the previous object is no longer the same object.1) object serialization must implement the Serializable interface, but there is no abstract method for the interface, and no overriding
frame: jQuery1.9.CSS Framework: Bootstrap 4 MetronicClient authentication: Jqueryvalidation Plugin.Rich Text: CkecitorFile Management: CkfinderDynamic tab: JerichotabData table: Jqgriddialog box: JQuery jboxTree structure controls: JQuery ZtreeOther components: Bootstrap 4 metronic3. SupportServer middleware: Tomcat 6, 7, Jboss 7, WebLogic 10, WebSphere 8Database support: Currently only support MySQL database, but not limited to the database, the next version of the upgrade multi-data source sw
JSTL Core Tag Library has a total of 13 tags, functionally divided into 4 categories:
1. Expression control Tags: out, set, remove, catch
2. Process Control Tag: If, choose, when, otherwise
3. Cyclic Tags: forEach, fortokens
4.URL operation tag: import, URL, redirect
When using labels, be sure to include the following code in the header of the JSP file:
These labels are described in the following sectio
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.