0
点赞
收藏
分享

微信扫一扫

IO流_标准输入输出流概述和输出语句的本质


package cn.itcast_04;

import java.io.PrintStream;

/*
* 标准输入输出流
* System类中的两个成员变量:
* public static final InputStream in “标准”输入流。
* public static final PrintStream out “标准”输出流。
*
* InputStream is = System.in;
* PrintStream ps = System.out;
*/
public class SystemOutDemo {
public static void main(String[] args) {
// 由这里的讲解我们知道了,这个输出流基本质是IO流操作,把数据输出到控制台。
System.out.println("helloworld");

// 获取标准输出流对象
PrintStream ps = System.out;
ps.println("helloworld");

ps.println();
// ps.print();//这个方法不存在

// System.out.println();
// System.out.print();
}
}


举报

相关推荐

0 条评论