Code:
class String1
{
public static void main(String[] args)
{
String string = "hi this is alok kumar singh working in honeywell";
int start=10;
int end=25;
char buffer[] = new char[end-start];
string.getChars(start,end,buffer,0);
System.out.println(buffer);
}
}
in line : string.getChars (start,end,buff er,0);.... now in this if i specify 1 in place of 0 then its throwing the error of index out of bound can anyone explain me why so???
Comment