从beginIndex索引处开始截取字符串。
public String substring(int beginIndex)
这是参数的详细信息-
beginIndex - 包含开始索引。
import java.io.*; public class Test { public static void main(String args[]) { String Str=new String("Welcome to Learnfk.com"); System.out.print("返回值 :" ); System.out.println(Str.substring(10) ); } }
这将产生以下输出-
返回值 : Learnfk.com
祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)