|
|
|
|
23
|
ObjectInputStream input = new ObjectInputStream(new FileInputStream("c:/text.txt"));
|
23
|
ObjectInputStream input = new ObjectInputStream(new FileInputStream("c:/text.txt"));
|
24
|
Object obj = input.readObject();
|
24
|
Object obj = input.readObject();
|
25
|
if(obj instanceof AA){ // obj객체가 AA 데이터 타입인지 체크
|
25
|
if(obj instanceof AA){ // obj객체가 AA 데이터 타입인지 체크
|
|
|
26
|
+
|
26
|
System.out.println(obj.toString());
|
27
|
System.out.println(obj.toString());
|
|
|
28
|
+ System.out.println(obj);
|
27
|
}
|
29
|
}
|
28
|
input.close();
|
30
|
input.close();
|
29
|
}
|
31
|
}
|