Two collections and a for loop. (Urgent help needed) Checking an object variable against an inputted String value. Nullpointerexception?

If you get a NullPointerException (NPE) when you call back. H_NAME. Equals(xxx) it probably means either back is null or back.

H_NAME is null You say that when you print back. H_NAME you get null, so that suggests that back. H_NAME is actually null.

You haven't shown us any code that describes the class Background so it's hard to give you any more help.

If you get a NullPointerException (NPE) when you call back. H_NAME. Equals(xxx), it probably means either back is null or back.

H_NAME is null. You say that when you print back. H_NAME, you get null, so that suggests that back.

H_NAME is actually null. You haven't shown us any code that describes the class Background, so it's hard to give you any more help.

True I thought I may have missed something. Here's the code for Background. Thanks.

Public class Background { String H_NAME; double T_START; double DT; double PBMEAN; public Background(String name, double starttime, double increment, double pbmean) { name = H_NAME; starttime = T_START; increment = DT; pbmean = PBMEAN; } } – Elliott Mar 20 '10 at 10:20 Yeah, I think its definitely null by the time I get to the method checking the H_NAME variable, I just cant work out why. Since if I print out the steps of the method that creates the data is definitely being read... – Elliott Mar 20 '10 at 10:23.

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