Weitere ähnliche Inhalte
Mehr von Yegor Bugayenko (20)
Kürzlich hochgeladen (20)
Need Robust Software? Make It Fragile
- 5. public int size(File file) {
if (!file.exists()) {
throw new Exception(
"file doesn’t exist"
);
}
return file.length();
}
- 7. try {
// something may go wrong
} catch (Exception ex) {
ex.printStackTrace();
}
// keep going...