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. Thank you... :)
Simple and effective explan

View Tutorial          By: Mohammed Muzammil at 2012-08-08 05:07:32

2. i have using struts tag in jsp ,
i have us

View Tutorial          By: sachin khatode at 2008-11-11 01:24:33

3. Also note that for reverse ordering, If you have a
View Tutorial          By: Dwight at 2011-07-13 22:13:45

4. where i can find jar files?
please tell me

View Tutorial          By: chandu at 2012-06-17 14:14:28

5. Thanks for a nice article !!!
View Tutorial          By: Piyush Sharma at 2011-12-15 12:24:06

6. Your script works beautifully. Is there a way to i
View Tutorial          By: JW at 2013-05-08 22:22:44

7. i have json data like coffeename and coffee prize
View Tutorial          By: Paramatma sharan upadhyay at 2015-09-21 12:14:31

8. Your explanation is good and okay but, it will be
View Tutorial          By: Emmanuel at 2009-05-28 02:45:11

9. @pankaj because u need to cast it. when u add num
View Tutorial          By: raziq at 2011-12-18 16:06:09

10. Hibernate can be an effective framework if one app
View Tutorial          By: Giao Vu at 2011-08-03 23:40:02