Exception checked and complained by the compiler are called Checked Exceptions in java.
At compile time, the java compiler checks that a program contains handlers for checked exceptions. Java compiler analyzes by which checked exceptions can result from execution of a method or constructor.For each checked exception which is a possible result, the throws clause for the method or constructor must mention the class or its superclasses of that exception.
Read more from JLS: http://docs.oracle.com/javase/specs/jls/se5.0/html/exceptions.html
IOException is a checked exception and hence java compiler asks you to either catch it or throw it. While IllegalArgumentException is a run time exception and is not checked or complained by the compiler.