Objective
These days in the consolidation of the basic knowledge of Java content, the value of the transfer is not a special understanding, so looked up some information and online related blogs, their own summary, and finally organized into a
Baidu Encyclopedia: Merge Sort (merge-sort) is an effective sorting algorithm based on merging operation, which is a very typical application using divide-and-conquer method (Divide and Conquer). The ordered Subsequence is merged to obtain a fully
1. Meaning of XML parsingXML files, in addition to developers, are more used to read the contents of an XML file using a program2, the parsing method of XMLDom parsingSax parsing3. Parsing tool FOR XML 3.1, Dom parsing tool1.JAXP (Oracle-sun company
111111111111Class cls = class.forname ("package name. Class name");Object o = cls.newinstance ();222222222222Method of Acquisitionmethod = Cls.getmethod ("Set" +stringutil.makefirstletteruppercase (key), boolean.class);// The Boolean here can also
= =: Compares the address or value of variables in the Java stack local variable table for equality.equals: The address of the comparison variable refers to whether the object is the same object in the Java heap.Hashcode: A hash value is returned
The Java.util package is called the Java Toolkit, which contains most of the tool classesStochastic random number classNew Random ()Rd.nextint ()Rd.nextint (100)Scanner Scanner classScanner sc = new Scanner (system.in);String str = Sc.next ();String
Threadpoolexecutor inherits the abstract class Abstractexecutorservice, which implements two Interface:executorservice (children) and executor (parent);
When building Threadpoolexecutor, the following parameters are required:
Set Set1. OverviewCollectionList collection: Sequential (consistent in order of storage and extraction), repeatable.Set set: unordered (storage order and check out inconsistencies), unique2.HashSet(1). Overview: HashSet does not guarantee the set
DefinedEnsure that a class has only one instance and provides a global access point.The common point of the singleton mode is to ensure that only new one object is acquired each time the schema of this object.The simplest single-instance
Generic type1. Generics OverviewWhen we store data in a collection, we store both string and integer types of data. While traversing, we treat it as a string type and do the conversion, soWill error. But what? It didn't tell us during the
In the Java array, the variables and objects stored in the data is temporary, in order to ensure the permanent storage of data, you need to save it in the hard disk file, Java I/O technology can be saved to the hard disk text file. Before we know
1. Create a Package(1), right-click on the SRC node of the project and select the New/package command.(2), in the pop-up new Java Package dialog box, in the Name text box, enter the new bundle name, such as COM.LZW, and then the stand-alone Finish
1. Use new to create objects, allocate object space in heap memory, initialize;2. Define a local variable in the method stack and eat a reference to the object in the heap memory;3. The method executes the return, the stack memory is freed
Garbage Collection
Three things to consider in garbage collection:
What kind of memory needs to be recycled?
When do I recycle?
How to recycle?
The first step is to determine if the object is alive.Reference
//Code Snippets//issue background: When importing a table, there is no problem when there is only one piece of data, but when the import is not a single piece of data, the next line reads after the data row with the data is read.//Although the row
Summarize the relevant knowledge points of the Java reflection mechanism,I. What is reflectionThe Java reflection mechanism is in the running state, for any class can know its properties and methods, for any object can call its properties and
Directly on the code:ImportJava.io.BufferedReader;ImportJava.io.InputStreamReader;Importjava.net.InetSocketAddress;ImportJava.net.Proxy;ImportJava.net.URL;Importjava.net.URLConnection; Public classTrans {Static intTimeout = 10 * 1000;//in units of
1. FileA class that represents a file or directory (folder)Exercise: Delete a table of contentsThinking Analysis: Write a separate method to delete the directory or file: Determine whether it is a directory (isdirectory) or a file (isfile), if the
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