摘要:
总结:BufferedReader。InputStreamReader.字节与字符的区别。package com.ds;import java.io.*;//从控制台输入字符串,输到sdd时停止输入public class yuiy { public static void main(String[] args) throws Exception { BufferedReader b = new BufferedReader(new InputStreamReader(System.in)); String s;// 字符串、结果:输入字符串 System.out.println(" 阅读全文
摘要:
总结:read()方法返回类型是int型??不知道该怎么用好循环》package com.da;import java.io.*;public class fgbv { public static void main(String[] args) throws IOException { BufferedReader bb = new BufferedReader(new InputStreamReader(System.in)); char c; System.out.println("enter a line"); do { c = (char) bb.read(); 阅读全文
摘要:
总结:输入流、输出流。。子类多。需要加强:package com.da;import java.io.*;public class rtr { public static void main(String[] args) { File file=new File("dfad.txt"); OutputStream ops=null; try{ ops=new FileOutputStream(file,true);//是否追加 String a="fasdf is my "; byte []b=new byte[1325]; for(byte temp: 阅读全文