This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
#1 does not throw a Null Ponter Exception where as #2 throws.
#1 : equalsIgnoreCase allows null values to be passed as a parameter. Its returned value will be true if the argument is not null and it represents an equivalent String ignoring case; false otherwise.
#2 : Trying to call a method on a null object will always throw a NullPointerException