Ex11_6 코드

package org.javaro.lecture; import java.io.*; public class Ex11_6 { public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("조병수-20191120-스트림"); String s = new String(); try { FileInputStream fin = new FileInputStream("F://Users/whqud/Desktop/1234.txt"); int c; while((c=fin.read())!=-1) { System.out.print((char)c); } fin.close(); } catch(IOException ioe) { System.out.println("파일없음"); }catch(Exception e) { System.out.println("파일지정하세요."); } } }

실행창

lobster