Java InputStream類案例
提問人:劉旭39發(fā)布時(shí)間:2020-11-28
import java.io.FileInputStream;
import java.io.InputStream;
//InputStream類
public class InputStreamDemo {
public static void main(String[] args) {
try {
InputStream inputStream = new FileInputStream("Date.Json");
System.out.println("創(chuàng)建輸入流:"+inputStream.toString());
System.out.println("輸入流讀取字符:"+inputStream.read());
inputStream.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
繼續(xù)查找其他問題的答案?
相關(guān)視頻回答
點(diǎn)擊加載更多評(píng)論>>