String Constructor: String(byte asciiChars[], int startIndex, int len)
Java String Handling
String Constructor: String(byte asciiChars[], int startIndex, int len)
/* Example of Simple String Object Creation class using String(byte asciiChars[], int startIndex, int len) constructor */
class HB3
{
public static void main(String args[])
{
byte ascii[]={65,66,67,68,69,70};
String H1=new String(ascii, 2, 3);
System.out.println(H1);
}
}
Sample Output