1. download Java Web: http://www.oracle.com/technetwork/java/javase/downloads/index.htmlI got a jdk-6u43-linux-i586.bin.
Ii. Installation 1. I created a Java folder under OPT.# Mkdir/opt/Java
2. I used winscp to put the JDK file under the/usr/Java
After installing JDK on a computer, we can set it to make it usable in the Java environment. Right-click my computer. Open properties. Then select "environment variables" in "advanced". In the new open interface, you must set three attributes: "java_
Java Collection class relationship diagram:
List: Add/Remove/get/set.
1. arraylist: it is actually an array with a large capacity. Frequent addition or deletion is a nightmare and is suitable for random search;
2. pull list: added push/[Pop |
1. Static methods and static variables belong to a class instead of class objects.2. Reference of static methods and static variables is directly referenced by class names.3. You cannot call non-static methods or reference non-static member
I always think that tomorrow will be better, but today it will not be good. How will it be better tomorrow?
Any learning always starts with the concept. Therefore, you should first extract the definition of velocity on a network:
Velocity is a
If you want to receive data of any length and avoid garbled characters, you can useBufferedreaderClass
Public class bufferedreader extends Reader
Because the input data may contain Chinese characters, the complete stream is used here.
INT-> string
String S = string. valueof (I );
String S = integer. tostring (I );
String S = "" + I;
String-> int
Int I = integer. parseint (s );
Int I = integer. valueof (s );
The preceding two methods are acceptable. The first method
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->
Doctype HTML public "-// W3C // dtd html 4.0 transitional // en"
>
Html
>
Head
>
Title
>
Use the Java Script to
Conversion:
Convert string to document and then to XML
Convert from XML to document and then to string
View plaincopy to clipboardprint?Convert XML to string:Public static string xmlfile2string (string filename) throws saxexception, ioexception,
Author: gnuhpcSource: http://www.cnblogs.com/gnuhpc/
// This comparator uses a collator to determine the // proper, case-insensitive lexicographical ordering // of two strings. class ignorecasecomp implements comparator {collator Col;
I. Glossary
Internationalization is the process of designing an application that is applicable to multiple languages and regions. It is applicable to multiple languages and regions. When users in different languages and regions use this application,
The equals method is a Java. Lang. Object Class method.
There are two usage instructions:
(1) For string variables, the comparison method is different when "=" and "equals ()" are used to compare strings.
"=" Compares the values of the two variables,
Use Java to send get and post requests-Excerpted from crazy Java HandoutsThe openconnection () method of the URL returns a urlconnection object, which indicates that the application andThe communication link between URLs. The program can send a
When calling a method, you need to input appropriate parameters according to the method declaration. Passing parameters each time you call the method greatly enhances the uniformity of the method and avoids repeated functional code within the method.
Example 1: The application has the I/O buffer function classImport java. Io .*;Public class iotest{Public static void main (string ARGs []){Try{Filereader Fr = new filereader (ARGs [0]);Bufferedreader BR = new bufferedreader (FR );While (Br.
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