THE PACKAGE JAVA.LANG
java.lang.String
20.12
20.12 The Class
java.lang.String
An object of type
String
, once created, is immutable. It represents a fixed length
sequence of characters. Compare this to the class
StringBuffer
( 20.13), which
represents a modifiable, variable length sequence of characters.
The class
String
has methods for examining individual characters of the
sequence, for comparing strings, for searching strings, for extracting substrings,
for creating a copy of a string with all characters translated to uppercase or to low
ercase, and so on.
public final class String {
public String();
public String(String value)
throws NullPointerException;
public String(StringBuffer buffer)
throws NullPointerException;
public String(char[] value)
throws NullPointerException;
public String(char[] value, int offset, int count)
throws NullPointerException, IndexOutOfBoundsException;
public String(byte[] ascii, int hibyte)
throws NullPointerException;
public String(byte[] ascii, int hibyte,
int offset, int count)
throws NullPointerException, IndexOutOfBoundsException;
public String toString();
public boolean equals(Object anObject);
public int hashCode();
public int length();
public char charAt(int index);
public void getChars(int srcBegin, int srcEnd,
char dst[], int dstBegin)
throws NullPointerException, IndexOutOfBoundsException;
public void getBytes(int srcBegin, int srcEnd,
byte dst[], int dstBegin)
throws NullPointerException, IndexOutOfBoundsException;
public char[] toCharArray();
public boolean equalsIgnoreCase(String anotherString);
public int compareTo(String anotherString)
throws NullPointerException;
public boolean regionMatches(int toffset, String other,
int ooffset, int len)
throws NullPointerException;
531
footer
Our partners:
PHP: Hypertext Preprocessor Best Web Hosting
Java Web Hosting
Inexpensive Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Jsp Hosting
Cheap Hosting
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved