标签:计算 eal style rate logs ati work auto nbsp
public class homework1 { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub String str1="耿丹计算机Java20170320"; System.out.println(str1.substring(9,17)); } }
public class homework2 { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub String str="耿丹计算机Java20170320"; String newStr=str.replaceAll("ava","2EE"); System.out.println("替换后的结果:"+newStr); } }
public class homework3 { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub String str="耿丹 计算机 Java 20170320"; String newStr=str.replaceAll(" ",""); System.out.println("替换后的结果:"+newStr); } }
public class homework4 { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub String str="142202199607040111"; System.out.println("此人的生日为::"+str.substring(07,04)); } }
标签:计算 eal style rate logs ati work auto nbsp
原文地址:http://www.cnblogs.com/yypfd/p/6648988.html