标题: 九九乘法表打印到文档里怎么弄? [打印本页] 作者: 范康 时间: 2016-4-15 22:01 标题: 九九乘法表打印到文档里怎么弄? 九九乘法表打印到文档里怎么弄?作者: 小流氓 时间: 2016-4-15 23:05
public class WriteDemo {
public static void main(String[] args) throws IOException {
//创建一个字节输出流
OutputStream out = new FileOutputStream("D:\\dy.txt");
BufferedWriter buf = new BufferedWriter(new OutputStreamWriter(out));
for (int x = 0; x < 5; x++) {
for (int y = 0; y <4; y++) {
//System.out.print("*");
buf.write("*");