zoukankan      html  css  js  c++  java
  • [Java 12 IO] PrintStream 打印流 new PrintStream(new FileOutputStream(new File("/home。。

    Java  PrintStream 打印流  new PrintStream(new FileOutputStream(new File("/home。。。
    package com.qunar.basicJava.javase.io;
    
    import java.io.File;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.PrintStream;
    
    /**
     * Author: libin.chen@qunar.com  Date: 14-6-5 20:51
     */
    public class PrintDemo01 {
        public static void main(String[] args) throws FileNotFoundException {
            PrintStream printStream = null;
            printStream = new PrintStream(new FileOutputStream(new File("/home/hp/tmp" + File.separator + "test.txt")));
            printStream.print("hello ");
            printStream.println("world!!!!");
            printStream.close();
    
        }
    }
    

  • 相关阅读:
    java-多态
    java-继承
    java-访问修饰符
    mysql基础入门
    子查询
    多表查询
    mysql表(多对多)
    myslql主外键约束
    Sql语句分类
    Redis的一些介绍
  • 原文地址:https://www.cnblogs.com/robbychan/p/3786493.html
Copyright © 2011-2022 走看看