⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fileapp.java

📁 针对越来越多的用户喜欢JAVA
💻 JAVA
字号:
import java.io.*;
class SaveFile
{
  private char ch;
  private int i='a'-'A';
  void save()
  {
    System.out.println("请输入一个字符串:");
    try {
      FileOutputStream out= new FileOutputStream("a.txt");
      while((ch=(char)System.in.read())!='#')
      {
        if(ch>='a'&&ch<= 'z' )
           ch= (char)((int)ch-i);
        out.write(ch);
      }
       out.close();
     } catch(IOException e){ };
  }
}
public class FileApp
{
  public static void main(String[ ] args)
  {
    SaveFile f= new SaveFile();
    f. save();
  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -