Traditional Culture Encyclopedia - The 24 Solar Terms - What are the commonly used APIs for Java development?

What are the commonly used APIs for Java development?

1, String class String class represents a string. The value of a string cannot be changed after it is created. The string itself cannot be changed, but the address value recorded in the str variable can be changed. There are a lot of overloaded constructors in the String class. When learning a class, don't blindly try to use all the methods, but analyze what functions the object should have according to its characteristics. If you want to manipulate variable strings, you can use the stringbuffer area. StringBuffer is the stringbuffer area. It is a container that can hold many strings and manipulate them. Regular expression is a string, described by a single string, which is used to define matching rules and match a series of strings that meet certain grammatical rules. In development, regular expressions are usually used to retrieve and replace texts that meet certain rules.

2. Dateformat class date represents a specific moment, accurate to milliseconds. Date has many constructors that can convert millisecond values into date objects. DateFormate is an abstract class of date/time formatting subclass, which is used to parse date or time. Datefate is an abstract class, and it is generally necessary to use a subclass of Simple DateFormate to create objects.

3.Calendar Calendar is a calendar class, which replaces many Date methods. Encapsulate all possible time information into static member variables for easy access. On the other hand, Calendar is an abstract class. When creating an object, it is not created directly, but through a static method, which handles the language-sensitive content well and then returns the subclass object.

4.System: System represents the system where the program is located, and provides some corresponding system attribute information and system operation. The methods in its classes are static and the class names are accessible.

5.Math: Math class is a mathematical tool class, which contains methods to perform basic mathematical operations, such as elementary functions, logarithms, square roots, etc. All its methods are static and usually do not create any objects.

6. Array: Array classes are usually used to manipulate various methods of arrays (such as sorting and searching). If the specified array reference is null, accessing a method in this class will throw a NullPointerException.

7. Big data operation: Generally, data exceeding long type cannot be an integer, but it can be encapsulated into a BigInteger object during operation. In the BigInteger class, all four operations are realized by methods, not by operators. There are methods of addition, subtraction, multiplication and division in elementary arithmetic. Double and float types are easy to lose precision in operation, resulting in inaccurate data. Providing BigDecimal class in Java can realize high-precision operation of floating-point data.