Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help: Program not doing what it's supposed to
#5
(12-09-2009, 10:34 PM)1337 Wrote: You are comparing a String with == this operator can only be used on primitive data types such as booleans, doubles, ints.

Ergh, that caught me out when I first used Java. It was my first time meeting a high-level language that didn't have an overloaded equality/inequality operator on a string class to do a string compare (and I still find it quite stupid, why would you ever want to compare the memory address of a string literal? It will never match anything else).
[Image: sig.php]
The little boat gently drifted across the pond exactly the way a bowling ball wouldn't.
Reply


Messages In This Thread
RE: Help: Program not doing what it's supposed to - by MrD. - 12-10-2009, 03:45 AM

Forum Jump:


Users browsing this thread: 4 Guest(s)