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

📄 main.java

📁 java的经典例子
💻 JAVA
字号:
import java.io.FileOutputStream;
import java.io.IOException;

class Main {
    public static void main (String[] args) {
        if (args.length != 1) {
            System.err.println("Usage: java Main <output_file>");
            System.exit(-1);
        }
        try {
            // create file in append mode
            FileOutputStream out = new FileOutputStream(args[0], true);
            byte[] buf = {'h', 'e', 'l', 'l', 'o', '\n'};
            out.write(buf);
            out.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}

⌨️ 快捷键说明

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