Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void load()
- {
- try
- {
- FileInputStream file = new FileInputStream("bank.data");
- ObjectInputStream readThisFile = new ObjectInputStream(file);
- //The follow line is marked with a yellow warning:
- //Type safety: Unchecked cast from Object to List<Client>
- //What does it mean?
- clients = (List<Client>)readThisFile.readObject();
- readThisFile.close();
- }
- catch (Exception e)
- {
- e.getMessage();
- clients = new ArrayList<Client>();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement