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,i am new in java..plz send me java programmes i
View Tutorial          By: dinesh at 2012-12-30 15:58:31

2. please send detail informatoin about j2me.. send a
View Tutorial          By: Saranya at 2011-07-06 03:00:21

3. How can you print this using recursion?

View Tutorial          By: Menon at 2011-09-08 07:16:02

4. class loop8
{
public static voi

View Tutorial          By: ankush singh at 2011-11-04 16:26:36

5. I want to get SCJP!
View Tutorial          By: Johny at 2009-08-24 22:48:56

6. Hi All,

This code is working fine i

View Tutorial          By: A.Balaji at 2010-09-27 04:40:38

7. M having query
i wat to create employee cla

View Tutorial          By: Dayasagar at 2010-05-22 16:18:17

8. Would be great if you also showed how to manipulat
View Tutorial          By: Sparx at 2010-01-05 13:51:56

9. I am certifed java Business Component Developer, m
View Tutorial          By: Kobs at 2013-02-26 11:58:22

10. java program to maintain the books details like Bo
View Tutorial          By: Prabha at 2013-08-28 12:34:00