■起こらない例外の処理方法
例外処理しないのではなく、ErrorまたはRuntimeExceptionをthrowするとさらに安全
悪い例:
try{
url = new URL("http://www.google.com");
}catch(MalformedURLException){
// do nothing
}
良い例:
try{
url = new URL("http://www.google.com");
}catch(MalformedURLException){
throw new RuntimeException(e.toString());
}
■ArrayListはListインタフェースを実装したクラス(Implemented Class)
■Iterator
参考1
■正規表現
参考1
No comments:
Post a Comment