第五次java作业

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));
    }

}
package classwork;

public class Demo02{

     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 Demo01 {

 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));
    }

}

 

posted @ 2017-03-30 22:49  BGD160809326  阅读(106)  评论(1编辑  收藏  举报