I am using the substring methodto get part of a string.
String string = "WelcomeToJava";
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.Code: