ツイッターで見かけたヤバイコードを実行してみました。
案の定、例外を掴んだ方でぬるぽで死にます。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class NullException { | |
public static void main(String[] args){ | |
try{ | |
throw null; | |
}catch(Exception e){ | |
e.printStackTrace(); | |
} | |
} | |
} | |
//java.lang.NullPointerException | |
// at NullException.main(NullException.java:4) |
遠くで投げると死にそうですね。
0 件のコメント:
コメントを投稿