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. any help please I'm getting this exception

View Tutorial          By: Bull at 2012-01-02 17:22:18

2. how do i write the above same code using ajax and
View Tutorial          By: Karthik at 2011-08-29 11:21:45

3. java is new for me..... since i dont know from bas
View Tutorial          By: m.padma at 2011-08-08 15:40:23

4. (i'm a senior PHP programmer, but a newbie in JSP,
View Tutorial          By: LOL at 2013-03-22 08:57:21

5. MSComm1.Settings="9600,n,8,1"

View Tutorial          By: ali at 2012-02-25 21:52:21

6. feel happy but i want to database tables also
View Tutorial          By: sisira at 2013-06-05 13:26:51

7. Very good. Excellent examples and easy to understa
View Tutorial          By: Fernando Basso at 2012-09-30 22:17:56

8. we can create reference variable for an abstract c
View Tutorial          By: siva at 2012-08-30 06:03:50

9. for the guys who is facing problems
just c

View Tutorial          By: Elie at 2010-05-03 12:12:48

10. java use real world object ............
View Tutorial          By: yunus khan at 2012-12-07 08:24:47