Java Basic Class Library:
(a), enter the relevant
Main (string[] args): setting input parameters
Input class; Scanner:scanner sc=new Scanner (system.in);
(ii) System-related classes
1,system class: Gets the environment variables and system properties of the current running platform
2,runtime class; Get the parameters of the JVM
(c), Common class
1,object class: Cloning Method (clone) is simply a simple copy of an object, not a pointer to the same object objects class: A tool class for the object class (that is, the object is handled as objects)
2,string,stringbuffer and StringBuilder class
The 1,string class is a constant, and once declared is immutable, stored in a constant pool, the intermediate process is prone to extra temporary variables.
The 2,stringbuffer class is mutable, thread-safe
The 3,stringbuilder class is mutable and thread is unsafe
4, execution speed on stringbuilder>stringbuffer>string
3,math class Math.random ()//is a method that is greater than or equal to 0.0 and less than 1.0 pseudo-random double value util. The random is a class (the former uses the latter to produce the method), and the Threadlocalrandom class is designed for multi-threading.
4,bigdecimal is designed for: double and float are prone to loss of precision in operations, and when new is a BigDecimal object, it is recommended to use the string type in the constructor method parameter instead of the double type (which guarantees accuracy). Or you can construct the object with a. getValues (double num). DecimalFormat (Requirements for setting output format)
5, Time class:
The 1,data class creates a new class, which is equivalent to calling the System.currenttimemillis ()
2,calendar class, is abstract class
3,java8 has added a java.time package
(iv) Regular expressions
1, special character requirements:
2, pre-defined characters
3, square brackets expression:
4, Boundary match character
5, quantifier
6, instance: (Continue adding later ...) )
6.1: Mailbox: String regex= "\\w{3,20}@\\w+\\. (com|org|cn|net| gob) "
Basic Class Library Learning of Java