首页 > 代码库 > java第五次作业

java第五次作业

public class Homework01 {

	public static void main(String[] args) {
		String str="耿丹学院计算机Java20170320";
		System.out.println(str.substring(11));

	}

}

  

public class Homework02 {

	public static void main(String[] args) {
           String str="耿丹计算机Java20170320";
           String newStr=str.replaceAll("Java","J2EE");
           System.out.println("替换后的结果:"+newStr);
	}

}

  

public class Homework03 {

	public static void main(String[] args) {
	      String str="耿丹    计算机     Java  20170320";
	      String newStr=str.replaceAll("  ","");
	      System.out.println("替换后的结果:"+newStr);
	}

}

  

public class Homework04 {

	public static void main(String[] args) {
	       String str="11011119970921****";
	       System.out.println(str.substring(6,14));
	}

}

  

java第五次作业