//时 代 J a v a - nowjava.com 提 供
public class Main {
public static void main(String[] arguments) {
String str = " this is a test. this is a test. this is a test?";
System.out.println("The string is: " + str);
System.out.println("Length of this string: " + str.length());
System.out.println("The character at position 6: " + str.charAt(6));
System.out.println("The substring from 26 to 32: " + str.substring(26, 32));
System.out.println("The index of the first 'a': " + str.indexOf('a'));
/**代码未完, 请加载全部代码(NowJava.com).**/
本文系作者在时代Java发表,未经许可,不得转载。如有侵权,请联系nowjava@qq.com删除。