打印流(PrintWriter)

打印流(PrintWriter)

package com.tiedandan.IO流.打印流;

import java.io.FileNotFoundException;
import java.io.PrintWriter;

public class PrintWriterClass {
    public static void main(String[] args) throws Exception {
        PrintWriter pw = new PrintWriter("d:\\print2.txt");
        pw.println(97);//PrintWrite类可以忽略掉字符转换.97本应转换为对应的字母a,但是打印的却是数字97
        pw.println('a');
        pw.println(true);

        pw.close();
        System.out.println("执行完毕");
    }

 

上一篇:拳皇97人物笔记


下一篇:day03 数组