String Constructors: String(char chars[], int startIndex, int len)
Java String Handling
String Constructors in Java: String(char chars[], int startIndex, int len)
/* Example of Simple String Object Creation class */
class HB
{
public static void main(String args[])
{
char chars[]=('H','e','e','r','a');
String stringObject=new String(chars, 2,3);
System.out.println(stringObject);
}
}
Sample Output