20165236 Six week Java Learning summary
First, the eighth chapter content:
1. String class:
String object, constant object;
Common methods:
length,equals,startswith,compareto,contains,contains,substring;
2, StringTokenizer class:
StringTokenizer (string s): Constructs a parser for string object A. Use the default separator tag, that is, space characters, line breaks, carriage returns, tab characters, feed characters are delimited;
StringTokenizer (String s,string Delim): Constructs a parser for string object S. Any permutation of the characters in the character sequence of the parameter Delim is used as a separator mark;
3, scanner class;
4. StringBuffer class: StringBuffer object; Common methods:
Append,charat,sercharat,insert,reverse,delete,replace;
5, date class and Calendar class;
6. Format the date:
Format method: Format (formatted mode, list of dates)
Format mode: A sequence of characters enclosed in double quotation marks, in which the characters in the sequence are composed of time and ordinary characters;
Date list: Can be a comma-delimited calendar object or a Date object;
Format the same date: You can format the same date with "<";
Week format for different regions:
Format of the week with a specific region: format (locale locale, format mode, date list);
Number formatting: Calling the Format method
The width of the data: "%MD" adds a space to the left of the number; "%-MD" adds space to the right of the number;
7, Math class, BigInteger class and Random class;
8, Number formatting: Format method, formatting integers, formatting floating-point numbers.
Second, the 15th chapter content:
1. Generics: When using generic classes to declare and create objects, a pair of "<>" is added to the class name, and the generics in the "<>" must be replaced with a specific type;
2. Linked list: A data structure composed of several objects called nodes;
3, Stack: is a "LIFO" data structure, only one end of the input or output data operation;
Create stack object: stack; Press stack operation: public e push (e item);
Play stack operation: public E pop ();
Determine if the stack still has data: public boolean empty ();
Gets the data at the top of the stack, but does not delete the data: public int search (Object data);
4. Hash Map: Create object: HashMap;
5, tree set;
6, tree mapping.
Iii. the problems encountered during the learning process and the process of solving them:
1. Example15_4 the warning when compiling: Apply the method sort in class collections to the given type (not resolved);
2. Chang is divided into two types, static constant pool and constant pool at runtime. Static constant pool: a constant pool in a class file; run-time Chang: is part of the method area. The benefits of constant pooling: save memory space and run time.
Iv. Script Run Results:
20165236 Six week Java Learning summary