Search:

Type: Posts; User: KevinWorkman

Search: Search took 0.07 seconds.

  1. Re: string==null or string.equals(null) problem

    Right, but that isn't what the OP was asking, and it's not what you advertised it as (your original post said it was checking the null of the String). Again, in the OP's case, your suggestion would...
  2. Re: string==null or string.equals(null) problem

    It's not that you aren't allowed to post code, it's just that posting full code solutions (especially when your solutions aren't completely correct, like the code you posted in this thread that...
  3. Re: string==null or string.equals(null) problem

    That does not test whether a Sting is null. In fact, that will result in an NPE if the String is null.
  4. Re: string==null or string.equals(null) problem

    They weren't deleted, I moved them to the cafe. That's where non-technical questions go, so you'll be more likely to receive a response there.
  5. Re: string==null or string.equals(null) problem

    I don't mean that you necessarily think I'm a jerk, but other people do get impatient when I ask to see their code- even though they're asking questions about their code!

    The reason I'm asking for...
  6. Re: string==null or string.equals(null) problem

    You can still use == to test against null.



    Yep, that's why half of my responses are asking for an SSCCE. People think I'm just being a jerk, but it's actually because oftentimes the OP is...
  7. Re: string==null or string.equals(null) problem

    I'm going to repeat this- without an SSCCE, we're having a really hard time understanding exactly what you're talking about. Post an SSCCE, and we'll go from there.
  8. Re: string==null or string.equals(null) problem

    Nope. I'd suggest you throw together a little test program, too! :p

    One more hint- It almost never makes sense to do someObject.equals(null).
  9. Re: string==null or string.equals(null) problem

    Okay. Like I said, throw together an SSCCE (should be just a main method with a single if statement that tests a single String) that demonstrates what's going on that you don't understand, and we'll...
  10. Re: string==null or string.equals(null) problem

    That won't work. Hint- What happens if str4 is indeed null?
  11. Re: string==null or string.equals(null) problem

    You've had quite a bit of guessing at your problem, but without an SSCCE, that's all it is. Post an SSCCE that demonstrates your problem, and you'll get a more definitive answer.
Results 1 to 11 of 11