More than 4000 basic class qualified programmers need to be familiar with 70%
String class String StringBuffer StringBuilder
Processing time Date obsolete use Calendar
Regular expression Pattern Matcher At the same time, String class also adds regular support
Internationalization supports Locale ResourceBundle to load the language resource file corresponding to Locale and call the getString() method
The main() method is called by the JVM using the public static void modifier
The JVM sets the args array to an array of length 0 by default
The case where the parameter itself contains spaces java ArgsTest "Java Spring"
Scanner Regular expression-based text scanner for parsing primitive types and string values from files, data streams, and strings
Use whitespace (space, tab blank, carriage return) as input separator
Both the hasNext() method and the next() method may block whether hasNext() blocks or not has nothing to do with whether next() blocks or not
Interactively access environment variables and system properties through the System class and Runtime class and the runtime platform to load files and dynamic link libraries
identityHashCode calculates hashCode based on the address of the object
Runtime runtime environment Each program has a Runtime object exec starts a new process to run operating system commands
The equals method of the Object class judges whether two objects are the same object is meaningless hashCode() is also calculated based on the address
toString() method returns "Runtime class name@hexadecimal hasCode value"
The clone() method with protected modification can only be overridden or called by subclasses
Implement the Cloneable interface and implement your own clone method. Generally call super.clone() Shallow clone the member variable of the reference type, only copy the reference and not the object pointed to
StringBuilder and StringBuffer are similar to StringBuffer, which is thread-safe. StringBuilder has higher performance. CharSequence String protocol interface
The constructor String() creates a String object containing a sequence of 0 strings
String(byte[] Charset) Decodes the byte[] array into a new String object using the specified character set
compareTo returns the difference of lengths if it is a substring, otherwise returns the difference of the first distinct characters
contentEquals(StringBuilder sb) compares the contained character sequence getBytes[] converts the String object into a byte array
The getChars method puts the string into a character array toCharArray converts it to a character array
Math nextUp() returns a floating point number slightly larger than the target number nextAfter() returns the floating point number adjacent to the first argument
The Random class provides more ways to generate random numbers. The ThreadLocalRandom class reduces multi-threaded resource competition in a concurrent environment. Use the current() method to obtain objects
When the seeds with the same method are called in the same order, the generated number sequence is the same, which proves that Random is a pseudo-random , not random.
The addition, subtraction, multiplication and division of floating-point numbers is imprecise. BigDecimal is better to use strings as constructor parameters. If using BigDecimal(5.0) cannot get exact floating-point numbers, you should use BigDecimal.valueOf(5.0)