This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
since it was OR it will check for not null (!= null) and will enter the loop once is satisfied even if it is empty string ("") since it will not check for the second expression if it gets a true for the first expression. Also to stress a point it will be good to use constants first to avoid any null pointer exception in equalsIgnoreCase() like !("".equalsIgnoreCase(value))