User Profile

Collapse

Profile Sidebar

Collapse
wmartin
wmartin
Last Activity: Jan 13 '08, 10:46 PM
Joined: Jan 13 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • wmartin
    replied to String comparisons
    in Java
    Ah, perfect. Thank you for the explanation.
    See more | Go to post

    Leave a comment:


  • wmartin
    started a topic String comparisons
    in Java

    String comparisons

    Now I'm new to Java, but I was under the impression that when using == to compare two Strings, java checked to see whether the objects where exactly the same rather than doing the character by character check that equals() performs.

    However, when I was just fiddling about, I wrote this:

    Code:
    public class Test
    {
       private String testString;
       private String compareString;
    
       public
    ...
    See more | Go to post
No activity results to display
Show More
Working...