Vi. Common Java Classes

Source: Internet
Author: User

1. String-related classes (string, StringBuffer)---string------The Java.lang.String class represents an immutable sequence of characters------"XXXXX" is an object of the class------common construction method of the String class: (see API document)--------string ( String original)-----------Create a copy of the string object original--------string (char[] value)----------- Creates a string object with a character number--------string (char[] value, int offset, int count)----------- Creates a string object from the count character sequence starting with the offset entry with a single character array
2. StringBuffer class---java.lang.Stringbuffer represents a variable sequence of characters---StringBuffer andstring is similar, butStringBuffer can make changes to its string. ---common construction methods for the StringBuffer class:------StringBuffer (): Creates a "null" that does not contain a sequence of charactersStringBuffer Object------StringBuffer (String str): Create aThe StringBuffer object that contains the same sequence of characters as the String Object str.3. Basic data type packing class---Wrapper classes (such as Integer, double, etc.) these classes encapsulate a corresponding base data type value and provide it with a series of manipulations. ---Take the Java.lang.Integer class as an example: Construction method:------Integer (int value)------Integer (String s)4. File Class---java.io.File class represents the System file name (path and file name)5, Java.lang.Enum Enumeration type:---enum type:------can only take one of the specific values------use the ENUM keyword------is the Java.lang.Enum type---Example:------testenum.java6, Summarizes---string-related------regular Expressions---The underlying type wrapper class---Math---File-----Recursive---Enumeration
1. String-related classes (string, StringBuffer)---string------The Java.lang.String class represents an immutable sequence of characters------"XXXXX" is an object of the class------common construction method of the String class: (see API document)--------string ( String original)-----------Create a copy of the string object original--------string (char[] value)----------- Creates a string object with a character number--------string (char[] value, int offset, int count)----------- Creates a string object from the count character sequence starting with the offset entry with a single character array
2. StringBuffer class---java.lang.Stringbuffer represents a variable sequence of characters---StringBuffer andstring is similar, butStringBuffer can make changes to its string. ---common construction methods for the StringBuffer class:------StringBuffer (): Creates a "null" that does not contain a sequence of charactersStringBuffer Object------StringBuffer (String str): Create aThe StringBuffer object that contains the same sequence of characters as the String Object str.3. Basic data type packing class---Wrapper classes (such as Integer, double, etc.) these classes encapsulate a corresponding base data type value and provide it with a series of manipulations. ---Take the Java.lang.Integer class as an example: Construction method:------Integer (int value)------Integer (String s)4. File Class---java.io.File class represents the System file name (path and file name)5, Java.lang.Enum Enumeration type:---enum type:------can only take one of the specific values------use the ENUM keyword------is the Java.lang.Enum type---Example:------testenum.java6, Summarizes---string-related------regular Expressions---The underlying type wrapper class---Math---File-----Recursive---Enumeration




Vi. Common Java Classes

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.