Recently in parsing a pile of files, there are GBK, UTF-8, encountered garbled problem in the process, I believe many people who have done the relevant work have similar experience.
There are several areas related to Chinese encoding:1. encoding
I wrote a project in Java for the first time a while ago. It is less than two months since I carefully studied Java. Many times, I have to learn Java and write projects. But because of this, I deeply realized the simplicity and convenience of Java.
1. understanding of basic conceptsAbsolute path: the absolute path is the real path of the file or directory on your home page on the hard disk (URL and physical path), for example:C:/XYZ/test.txt represents the absolute path of the test.txt file.
Java is a strongly typed language. There are eight basic data types in Java, including four integer types, two floating-point types, one character type used to represent unicode encoding, and one character type used to represent the true value.1.
With the reflection mechanism of Java, we can access the private members and private functions of a class.
Accessing private fields
As mentioned above, the class. getfield (string) and Class. getfields () methods can only return public members.
To
Classes
Through the reflection mechanism, we can explore the internal structure of the class at runtime and obtain the following information:
Class Name
Class modifiers (public, protected, synchronized, etc)
Package info
Super class
Public httpservletresponse download (string path, httpservletresponse response) {try {// path indicates the path of the file to be downloaded. File file = new file (PATH); // get the file name. String filename = file. getname (); // get the file
Java features
VSimple and simple
VPlatform independence
VObject-oriented
VMultithreading
VDistribution
VHigh Performance (compared with other interpreted languages)
VRobustness
Concepts related to Java virtual machines
VWhat is JVM?
JVM is short for
04Java Basic _ Array
Array-related concepts
VIn Java, arrays are composite data types (reference data types ). An array is a set of ordered data. Each element in an array has the same data type. You can use a unified array name and subscript to
It seems difficult to obtain Mac information in Java.
But I saw a Java library, and it feels pretty good. Write it down first. Who has studied how to give me a speech and promote each other's progress ;)
1) third-party Java library. (Try this: http:/
1. Development Environment Integration
1) Integration in the myeclipse Environment
Add the following content to Windows-properties-Tomcat-JDK-optional Java VM arguments:
-Dsolr. SOLR. Home = D:/myprojects/Central/src/config/SOLR-dorg. Apache.
The software used is the DJ Java decompiler 3.9.
The following is a useful reference document to illustrate how to batch compile
Http://www.udl.es/usuaris/jordim/Progs/Readme.txt
After installation, find its installation path. my options are:
In a project, you need to make queries based on the first letter of certain query conditions (such as name). For example, if you want to query a person named "James", you can enter 'zs '. A tool class is written as follows:
/** GB 2312-80 divides
1. Compilation sequence:Compiler Virtual MachineJava source file *. Java -------> bytecode *. Class ------> Class Loader ---> execution engine
A. Class file can only contain one class or interface. Therefore, the number of classes defined in the.
I. General
The general topic is suitable for most Java applications.
1.1 create a class instance without the New Keyword
When you create an instance with the New Keyword, all constructors in the constructor chain are automatically called. However,
FTP command
The main FTP operations are based on various commands. Common Commands include:
◆ Set transmission mode, which includes ASC ⅱ (text) and binary mode;
◆ Directory operations: change or display the current directory of the remote
The dynamic proxy I just learned about Java is implemented using the java. Lang. Reflect. invocationhandler class and the java. Lang. Reflect. invocationhandler interface. It's easy to use. Let's record it and share it with you.
Use your own proxy
Four common functions of Java Regular Expressions
Regular expressions have powerful functions in string processing. Sun added support for them in jdk1.4.
The following describes four common functions:
Query:
The following is a code snippet:
1. Stack and heap in Java)
(1) Memory Allocation PolicyAccording to the compilation principle, there are three policies for memory allocation during program running: static, stack, and heap.Static Storage Allocation refers to the ability to
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