java开发实战经典(第二版)P157 T6

public class MyTest{
    public static void main(String args[]){
        String str1 ="Java技术学习班 20070326";
        System.out.println(str1.substring(10));
        String str2 ="MLDN JAVA";
        String neStr = str2.replaceAll("JAVA","J2EE");
        System.out.println(neStr);
        System.out.println(str1.substring(7,8));
        System.out.println(str1.replace("0",""));
        System.out.print(str1.replace(" ",""));
        System.out.println(str2.replace(" ",""));
        String str3 = "37070919950101114X";
        System.out.println(str3.substring(6,14));


    }

}
20070326
MLDN J2EE
习
Java技术学习班 27326
Java技术学习班20070326MLDNJAVA
19950101

你可能感兴趣的:(java开发实战经典(第二版)P157 T6)