20165219 2017-2018-2 "Java Programming" 6th Week study Summary

Source: Internet
Author: User
Tags stringbuffer

20165219 2017-2018-2 "Java Program Design" 6th Week study summary textbook Learning content Summary Eighth Chapter

StringClass

Common methods

public int length()To find the string length

public boolean equals(String s)Compares character sequences of two strings

public boolean startsWith(String s)To public boolean endsWith(String s) determine whether the prefix of the two-character sequence is the same

public int compareTo(String s)Size comparison by dictionary order

public boolean contains(String s)Determines whether the parameter S is included in the string

public int indexOf(String s), public int lastIndexOf(String s) finds the character or substring in the current string, returns the position

public String substring(int startpoint)Copy the characters from the StartPoint position to the last position

public String trim()Remove the front and back spaces of the word character

StringBufferClass

Common methods

StringBuffer append(String s)

StringBuffer append(int n)

StringBuffer append(Object o)

public chat charAt(int n )

public void setCharAt(int n ,char ch)

StringBuffer insert(int index, String str)

public StringBuffer reverse()

The memory space of the entities of the StringBuffer class object can automatically change size

StringTokenizerClass

ScannerClass

DateClass

CalenderClass

15th Chapter

Generics: Generic-class declaration:class 名称<泛型列表>

Linked list

Stack

Code Hosting

20165219 2017-2018-2 Java programming 6th Week of study summary

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.