public void Collection()

{


Ccollection = new Customer[300];

Customer obj = null;

count = 0;

FileInputStream fis = null;

ObjectInputStream ois = null;


try {

fis = new FileInputStream("Customerlist");

ois = new ObjectInputStream(fis);


while ((obj = (Customer) ois.readObject()) != null) {

Ccollection[count] = new Customer();

Ccollection[count] = obj;

System.out.print(Ccollection[count].getAge()

+ Ccollection[count++].getHeight());

}


fis.close();

ois.close();

} catch (ClassNotFoundException cnfe) {


} catch (IOException e) {

//계속 여기로 빠짐

}

}

파일에서 읽어와서 customer객체 배열로 모아 올라고 하는데 IOException때매 try구문이 실행이 안된다


각 줄마다 주석치면서 알아본 결과 try구문 2번째줄 ois = new ObjectInputStream(fis); 이거때매 예외상황 발생하는거 같긴한데 잘 모르겠음


코드도 빙구인 내가 짠거 아니고 여기저기서 보고 한건데 도저히 머가 문젠지 모르겟어요 도와줘잉 마리텔 러블리즈나오는데 이쁘당 ㅎㅎ