THE PACKAGE JAVA.LANG
java.lang.String
20.12
20.12.1
public String()
This constructor initializes a newly created
String
object so that it represents an
empty character sequence.
20.12.2
public String(String value)
This constructor initializes a newly created
String
object so that it represents the
same sequence of characters as the argument; in other words, the newly created
string is a copy of the argument string.
20.12.3
public String(StringBuffer buffer)
throws NullPointerException
This constructor initializes a newly created
String
object so that it represents the
sequence of characters that is currently contained in the
StringBuffer
argument
( 20.13). The contents of the string buffer are copied; subsequent modification of
the string buffer does not affect the newly created string.
If
buffer
is
null
, then a
NullPointerException
is thrown.
20.12.4
public String(char[] data)
throws NullPointerException
This constructor initializes a newly created
String
object so that it represents the
sequence of characters currently contained in the character array argument. The
contents of the character array are copied; subsequent modification of the charac
ter array does not affect the newly created string.
If
data
is
null
, then a
NullPointerException
is thrown.
20.12.5
public String(char[] data, int offset, int count)
throws NullPointerException,
IndexOutOfBoundsException
This constructor initializes a newly created
String
object so that it represents the
sequence of characters currently contained in a subarray of the character array
argument. The
offset
argument is the index of the first character of the subarray
and the
count
argument specifies the length of the subarray. The contents of the
subarray are copied; subsequent modification of the character array does not affect
the newly created string.
533
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