好的,让我举个例子:
String parentString = "HelloThisIsAString";
int stringPos = parentString.indexOf("String"); //Will return the position of the text "String" of the parentString.
String string = //Here the problem arises.
在python中我这样做:
string = parentString[stringPos:#to some certain text]
如何在 Java 中做到这一点。