站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Java Tutorial 5.0 英文版

Characters and Strings - Java Tutorial 5.0 英文版

The JavaTM Tutorial
Previous Page Lesson Contents Next Page Start of Tutorial > Start of Trail > Start of Lesson Search
Feedback Form

Trail: Learning the Java Language
Lesson: Object Basics and Simple Data Objects

Characters and Strings

When working with character data, you will typically use either the char primitive type, or one of the following three classes:
  • String (in the API reference documentation) — A class for working with immutable (unchanging) data composed of multiple characters.
  • StringBuffer (in the API reference documentation) — A class for storing and manipulating mutable data composed of multiple characters. This class is safe for use in a multi-threaded environment.
  • StringBuilder (in the API reference documentation) — A faster, drop-in replacement for StringBuffer, designed for use by a single thread only.
This section covers these string-related topics:

Previous Page Lesson Contents Next Page Start of Tutorial > Start of Trail > Start of Lesson Search
Feedback Form

Copyright 1995-2005 Sun Microsystems, Inc. All rights reserved.