Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help: Program not doing what it's supposed to
#8
(12-10-2009, 03:45 AM)MrD. Wrote: 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).
In java, strings are objects. So whenever you have a string literal (anything inside the "s), it's really pointing to that literal.

Also, nevets, whoever told you to shorten your variable names is a retard.
Reply


Messages In This Thread
RE: Help: Program not doing what it's supposed to - by wat - 12-10-2009, 01:15 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)