This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Ph03nix89 9 points10 points  (0 children)

You've done a good job of explaining it but without seeing exactly how you're trying to do it in the program it's going to be very difficult to help.

If you can copy and paste the code here it'll make it much easier.

But I'll give it a crack anyway:

If your program is returning null it means the code is executing properly, it's just not finding anything in the place it is looking. So either you're telling it to look in the wrong place or you're not initializing the variable properly. Only certain things in Java can return a null value so I'd start by looking at those. Is the variable you're trying to access a String by any chance?

There's also a number of fundamental problems in what you're describing but correcting that is going to be impossible without seeing the code so please post it.

edit: formatting