Getting a NullPointerException on a String comparison?

The NullPointerException is occurring on this bit of your if statement.

The NullPointerException is occurring on this bit of your if statement: dosetimeString. Equals("null") because you are calling a method on a null object, and as Roflcoptr says, if you actually need all those tests, you should make that line read: if (dosetimeString == null || dosetimeString. Equals("null") || dosetimeString.

Equals("")) { However, if you just want to check if it is null, you only need the first condition. If (dosetimeString == null) {.

It's because first you test dosetimeString. Equals("null") There you try to access variable dosetimeString which is null. So just use: dosetimeString == null.

That's because doestimeString is null. You can't access member functions on a null object! Put the doestiemString==null before doestimeString.

Equals( "null" ) and you should be ok. If (dosetimeString == null || dosetimeString. Equals("null") || dosetimeString.

Equals("")){ }.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions