public static void main(String args[]) {
String Str = new String("www.runoob.com");
System.out.print("返回值 :" );
System.out.println(Str.substring(1) );
System.out.print("返回值 :" );
System.out.println(Str.substring(0,3) );
}
返回值 :ww.runoob.com
返回值 :www