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



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. Hi!
this morning when i tried to logon a pr

View Tutorial          By: Lukas at 2013-03-03 13:35:42

2. Thank you very much for this tip.
View Tutorial          By: Lise at 2011-07-15 13:27:23

3. Impressing answer guys...
View Tutorial          By: Jayeeta Pal at 2011-06-28 03:18:26

4. Hi,

I am using the code files for s

View Tutorial          By: Utsav at 2009-07-14 01:29:06

5. Excellent tutorial thank you very much.

View Tutorial          By: Edd at 2012-01-15 10:49:00

6. May be someone would find this useful.


View Tutorial          By: Vsk at 2010-02-22 00:48:42

7. It is simply good and more informative
View Tutorial          By: ARUNA at 2011-06-19 06:32:29

8. I would like to know how to obtain the object that
View Tutorial          By: Steve at 2012-01-18 15:58:31

9. hellow my name is samer, i have a project of final
View Tutorial          By: samer flayha at 2011-08-17 09:37:16

10. great resource
View Tutorial          By: Anonymous at 2011-04-14 03:14:43