i 绝望

依然

Miss Lang

java代码异常普通的====

总结:对于各种流类,

package com.da;

//包括运行异常,和非运行异常
import java.io.*;

public class ryl {
	public static void main(String[] args) {
		try {
			FileInputStream fis = new FileInputStream("log.txt");
			int s;
			while ((s = fis.read()) != -1) {
				System.out.println(s);
			}
			fis.close();
		} catch (FileNotFoundException e) {
			// throw new FileNotFoundException();
			System.out.println("message:" + e);

			System.out.println("异常是:" + e.getMessage());
		} catch (IOException EE) {
			System.out.println("EE");
		}
		System.out.println("程序正常结束!!!!");
	}
}

  

 

posted on 2013-11-09 22:12  juewang  阅读(230)  评论(0编辑  收藏  举报

绝望依然

Miss Lang