Results 1 to 5 of 5
Like Tree1Likes
  • 1 Post By JosAH

Thread: Hello i will happy that you will help me....

  1. #1
    Gershonvish is offline Member
    Join Date
    Dec 2012
    Posts
    2
    Rep Power
    0

    Default Hello i will happy that you will help me....

    I want to know why it does not work ... If there is another way?

    String s1= "Hello ";
    String s2= "world";

    String s= s1+s2;

    String n = "Hello world";


    if (s==n) System.out.println(n);

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,652
    Blog Entries
    7
    Rep Power
    21

    Default Re: Hello i will happy that you will help me....

    Read the API for the String.equals( ... ) method (you can't compare Strings (or any other class) for equality with the == operator).

    kind regards,

    Jos
    Gershonvish likes this.
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    Gershonvish is offline Member
    Join Date
    Dec 2012
    Posts
    2
    Rep Power
    0

    Default Re: Hello i will happy that you will help me....

    Thank you

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,422
    Rep Power
    20

    Default Re: Hello i will happy that you will help me....

    Please go through the Forum Rules, particularly the third paragraph.

    Please also go through Guide For New Members and BB Code List - Java Programming Forum and edit your post accordingly.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  5. #5
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,422
    Rep Power
    20

    Default Re: Hello i will happy that you will help me....

    Moved from Advanced Java. Please don't post beginner questions in that section.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Replies: 2
    Last Post: 03-27-2012, 08:34 AM
  2. Hello everybody and happy new year...
    By Maisondouf in forum NetBeans
    Replies: 0
    Last Post: 01-02-2012, 12:18 PM
  3. Happy New Year!
    By DarrylBurke in forum Forum Lobby
    Replies: 0
    Last Post: 01-01-2012, 07:44 AM
  4. Happy Independence Day
    By JosAH in forum Forum Lobby
    Replies: 9
    Last Post: 07-04-2011, 09:55 PM
  5. Happy 2011
    By jomypgeorge in forum New To Java
    Replies: 2
    Last Post: 12-31-2010, 11:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •