Hi,
I am using the substring methodto get part of a string.
String string = "WelcomeToJava";
System.out.println(string.substring(9,12));
Output:
I want to get output "Java". The index of "J" is 9 and index of a is 12. It appears that the first argument to the method is inclusive and the second one is exclusive. Please correct me.