Can any body tell me why the output of the following code snippet is "ic"
Code Snippet:
String s=new String("Bicycle");
int iBegin=1;
char iEnd=3;
System.out.println(s.substring(iBegin,iEnd));
Why isn't it raising an exception since char is present as second argument
Code Snippet:
String s=new String("Bicycle");
int iBegin=1;
char iEnd=3;
System.out.println(s.substring(iBegin,iEnd));
Why isn't it raising an exception since char is present as second argument