Getting a null pointer exception how would I avoid this because I have to try to find if the array has null value and notify if it has null value . Right now it just puts up a NPE.
String [] s = {null,"first","890808908","4545645646","989809908098","65756756757","second"};
for (String word : s){
if (!word.equals("first") && !word.equals("second") && word == null){
System.out.println("yes there is null value");
}
}
}