Tag: Parameter log RTP class program to get the console position call
20165201 2017-2018-2 "Java Program Design" 6th Week study summary textbook Study content summary eighth chapter
String
Class can effectively handle character sequence information, and its common methods are:
public int length()
You can count the String
length of a character sequence for an object
For example:
String a = "rocedu"; int n1,n2; n1 = a.length(); n2 = "dsgdsdbs".length();
public boolean equals(String s)
You can compare String
whether the current object's character sequence is the same as the character sequence of the object specified by the parameter s String
public boolean startsWith(String s)
And
public boolean endsWith(String s)
The former determines whether the character sequence prefix of the current String
object is the character sequence of the object s specified by the parameter String
, which determines whether the character sequence suffix of an String
object is String
the character sequence of the object s.
public int compareTo(String s)
The size of the String
character sequence of the object s specified by the dictionary order and parameter
public boolean contains(String s)
Determines String
whether the character sequence of the current object contains the character sequence of the parameter s
public int indexOf(String s)
And the public int lastIndexOf(String s)
former retrieves the position of the String
first occurrence of the character sequence starting at the 0 index position of the current object's character sequence, str
and returns that position, which retrieves the position of the String
last occurrence str
of the character sequence starting at the 0 index position of the current object's character sequence. and return to that location
public String substrings(int startpoint)
You can get a new object, the character sequence of the new object is the character sequence that String
String
copies the String
position in the character sequence of the current object startpoint
to the last position of the character
public String trim()
You can get a new object, and the character sequence of the new object is the character sequence of the String
String
current String
object's character sequence minus the front and back spaces
StringTokenizer
The class does not differentiate between identifiers, numbers, and quoted strings, and they do not recognize and skip annotations. Can be specified at creation time, as well as by specifying delimiters for each tag
StringBuffer
Classes and String
classes: String
The value can not be changed, the value as long as the change will become a new object, but StringBuffer
it is convenient to delete and change the contents of the string without changing the object!
In addition, there are:
Date
Class
Calender
Class
Math
Class
BigInteger
Class
Random
Class
Class
Class
Console
Class
Pattern
Class
Matcher
Class
15th Chapter
- Generic class declaration: You can declare a class by using the class name < generic list >, for example:
class People<E>
- Linked list:
LinkedList<E>
generic class;
sorting and finding;
Shuffle and rotate
- Stack: Be sure to be advanced after out!
- Hash map
- Tree Set
- Tree mapping
- Automatic box packing and unpacking
Code Hosting
Last week's summary of the wrong quiz
Parsing: B: A subclass can have only one parent class, but a parent class may have more than one child class
Parsing: The A:abstract keyword cannot be applied to static, private, or final methods. E: cannot have method body
Parse: A: It should be dashed. C: The interface cannot invoke other non-interface methods in the class
Learning progress Bar
|
lines of code (new/cumulative) |
Blog Volume (Add/accumulate) |
Learning Time (new/cumulative) |
Important Growth |
Goal |
6000 rows |
30 Articles |
400 hours |
|
First week |
23/23 |
1/5 |
18/18 |
|
Second week |
367/390 |
2/7 |
16/34 |
|
Third week |
672/1062 |
1/8 |
23/57 |
|
Week Four |
724/1786 |
2/10 |
20/77 |
|
Week Five |
1084/2870 |
1/11 |
15/92 |
|
Week Six |
1187/4057 |
1/12 |
18/110 |
|
Resources
- Use the Code cloud and blog Park to learn a simple tutorial
20165201 2017-2018-2 "Java Programming" 6th Week study Summary