November 21, 2019 Java Learning

Insert the method parse in the DateFormat class here to parse the text into a date into the picture description
Enter the picture description here for StryingBuilderString buffer, improve the efficiency of string usage
Common usage of StringBuilder
public static void append(): add any type of data in the form of a string, and return the current object itself
Can chain programming.  Insert picture description here
Automatic boxing and automatic unboxing insert picture description here
1. The difference between array and collection:
1. The length of the array is fixed Yes, the length of the collection can be changed
2. The array stores elements of the same type, which can store basic data type values; while the collection stores all objects, and the types of objects can be different. There are many objects in development At times, use collections for storage.
2. Define a method containing generics:
format:
modifier <generic> return value type method name (parameter list (using generics)) { method body} 3. Wildcard for generics ? Cannot be used when defining, but can be used when passing as a parameter . Advanced use of wildcards: 1. The upper limit of generics:? extends E—>? Can only be a subclass of E or E itself 2, the upper limit of generics:? super E---->? can only be the parent of E or E itself





Guess you like

Origin blog.csdn.net/CZHLNN/article/details/103190067