Then the proxy mode of the previous blog, we continue, the previous blog introduced the JDK dynamic agent, but the dynamic agent mechanism of the JDK can only implement the interface class, and can not implement the interface class can not implement
The so-called object serialization is to convert the state of an object into a byte stream, which can then be used to generate objects of the same state! object Serialization is an implementation of object persistence, which transforms the
Abstract data Typesabstract data types are a theoretical tool for describing data structures. Before we introduce the abstract data types, let's introduce aBasic concepts of the following data types. A data type is a set of data elements of the same
、This series of related content, is accumulated in these two years, this time to organize into a web version, on the one hand to share to everyone, on the other hand also convenient to consult.This article graphically demonstrates the need to use
Java fundamentals must be mastered by question 10 Q:Key points of knowledge:Define classes, fields, static adornments, local, member variable initialization,Inherit, (not) Check for exceptions, read and write streams, copy files.1. How to define a
The following table shows the syntax for regular expressions:Table 1.1 Regular Expression syntax
Metacharacters
Description
.
matches any single character. For
public class Arraysextends object This class contains various methods for manipulating arrays, such as sorting and searching. This class also contains a static factory that allows the array to be viewed as a list.Unless otherwise noted, the methods
Main classes and interfaces in IOFile, InputStream, OutputStream, Reader, Writer, serialzable interfaceFile classSmall examples of file class applicationsImport Java.io.file;import java.io.IOException; Public classFiledemo { Public Static void
Inner class definition
Place the definition of a class inside another class. This is the inner class.
The inner class relies on external classes for existence.
Internal class access access permissions
Public: Access is not
-XX:+PRINTGC the Java Virtual machine is started, the log is printed whenever a GC is encountered.
-xx:+printgcdetails The GC occurs, print a more verbose log.
When the-XX:+PRINTHEAPATGC GC occurs, more detailed heap information is printed.
The definition of the principle of Java reflection and the auto-injected reflection of springThe reflection mechanism of Java is in the running state,
All properties and methods of this class are known to any class;
For any object, you
Cause: The following are common:1. The amount of data loaded in memory is too large, such as fetching too much data from the database at once;2. There are references to objects in the collection class that are not emptied after use, so that the JVM
StringBufferCharacteristics:
is a string buffer.
is a container whose length is variable and can be manipulated to add multiple data types.
Finally, the ToString method becomes the string.
is modified by the final lock and
SimpleDateFormatSet the date and time you want to display the way:import Java.text.simpledateformat;import Java.util.Date;public class Formatdemo { public static void main (string[] args) {//TODO auto-generated method stub Date d = n EW Date
Strong referencesA reference to an object created by new in a generic program is a strong reference, and a strong reference can be reclaimed by the garbage collector only if it is unreachable from the root node, so a memory overflow may occur.Soft
1 in Java, to jump out of multiple loops, you can define a label in front of the outer loop statement, and then in the code of the Inner loop bodyUse the break statement with a label to jump out of the outer loop. For exampleOk:for (int i=0;i{for
1. Inner classAn inner class is a class defined inside a class, with a static inner class, a member inner class, a local inner class, and an anonymous inner class.-1) Static inner class: Use static adornments, declared in the class body, static
Two methods (sorted) and Map for Traversing map
Initialize a map
Map map = new HashMap();map.put("1", "hell");map.put("2", "hello");map.put("3", "hel");map.put("4", "hello");
1. The first method is widely used.
Set keySet = map.keySet();for (String
Call between JAVA constructor and java Constructor
This: It looks like it is used to distinguish between local variables and member variables.This indicates the Class Object. this indicates the reference of the object to which the method
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