Comment on Tutorial - String Class Constructors in Java By Daniel Malcolm



Comment Added by : Jameesh

Comment Added at : 2015-03-05 07:09:38

Comment on Tutorial : String Class Constructors in Java By Daniel Malcolm
S.N. Constructor & Description
1 String()
This initializes a newly created String object so that it represents an empty character sequence.
2 String(byte[] bytes)
This constructs a new String by decoding the specified array of bytes using the platform's default charset.
3 String(byte[] bytes, Charset charset)
This constructs a new String by decoding the specified array of bytes using the specified charset.
4 String(byte[] bytes, int offset, int length)
This constructs a new String by decoding the specified subarray of bytes using the platform's default charset
5 String(byte[] bytes, int offset, int length, Charset charset)
This constructs a new String by decoding the specified subarray of bytes using the specified charset.
6 String(byte[] bytes, int offset, int length, String charsetName)
This constructs a new String by decoding the specified subarray of bytes using the specified charset.
7 String(byte[] bytes, String charsetName)
This constructs a new String by decoding the specified array of bytes using the specified charset.
8 String(char[] value)
This allocates a new String so that it represents the sequence of characters currently contained in the character array argument.
9 String(char[] value, int offset, int count)
This allocates a new String that contains characters from a subarray of the character array argument.
10 String(int[] codePoints, int offset, int count)
This allocates a new String that contains characters from a subarray of the Unicode code point array argument.
11 String(String original)
This 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.
12 String(StringBuffer buffer)
This allocates a new string that contains the sequence of characters currently contained in the string buffer argument.
13 String(StringBuilder builder)
This allocates a new string that contains the sequence of characters currently contained in the string builder argument.


View Tutorial



Ask a Question

Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. can you clearly reveal how to create crystal repor
View Tutorial          By: halim at 2011-07-02 00:28:48

2. To execute program you need comm.jar that is not a
View Tutorial          By: shreyansh shah at 2012-07-11 05:57:42

3. i avinash can i know how ur problem is resolved ,i
View Tutorial          By: santosh at 2011-12-06 10:35:42

4. i have download the all 5 codes.but how can i run
View Tutorial          By: Chathu at 2011-01-30 02:28:53

5. You only need 1 main method per application, not 1
View Tutorial          By: Michael at 2011-09-02 02:37:51

6. Thank you very much..
This helped me a lot

View Tutorial          By: Rabeea AS at 2010-11-15 00:28:29

7. hi,
Very nice tutorial. But please I have s

View Tutorial          By: hemn at 2010-04-17 06:02:00

8. Thanks a ton!!! It was really very useful :)
View Tutorial          By: Ankit at 2015-05-11 12:30:41

9. nice article...........................
View Tutorial          By: abhijit at 2012-09-24 11:12:46

10. This is very much useful to me to complete my assi
View Tutorial          By: Eva Jhonson at 2012-09-30 16:44:08