zoukankan      html  css  js  c++  java
  • 【每日日报】第四十二天

    1 今天开始整理暑假作业

     文件操作:

    package Hello;

    import java.io.FileInputStream;

    import java.io.IOException;

    import java.io.OutputStream;

    import java.io.PrintStream;

    import java.io.FileOutputStream;

    import java.io.FileNotFoundException;

    public class CPP0046 {

         public static void main(String[] args){

                FileInputStream in=null;

                try{

                       in=new FileInputStream("D:/s1.txt");

                       PrintStream out=new PrintStream(new FileOutputStream("D:/d1.txt"));

                       byte[] ch=new byte[1024];

                       int len=-1;

                       String s=" ";

                       while((len=in.read(ch))!= -1){

                              s=new String(ch,0,len);

                    }

                       char[] ch1=s.toCharArray();

                       for(int i=0;i<s.length();i++){

                              if((ch1[i]>='a')&&(ch1[i]<='z'))ch1[i]-=32;

                       }

                       out.println(ch1);

                }catch (IOException e){

                       System.out.println("can not open txt");

                }

        }

    }

    2 没有什么问题

    3 明天继续整理暑假作业

  • 相关阅读:
    linux串口驱动分析
    redis 源代码分析(一) 内存管理
    EJB3.0开发环境的搭建
    Google App Engine 学习和实践
    用EnableMenuItem不能使菜单变灰的原因
    hdu 1171 Big Event in HDU(母函数)
    Stack-based buffer overflow in acdb audio driver (CVE-2013-2597)
    遗传算法入门到掌握(一)
    Amazon SQS简单介绍 上篇
    Matlab画图-非常具体,非常全面
  • 原文地址:https://www.cnblogs.com/linmob/p/13519446.html
Copyright © 2011-2022 走看看