Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

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

  1. #1
    Junior Member
    Join Date
    Dec 2012
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    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

  3. The Following User Says Thank You to helloworld922 For This Useful Post:

    gershonvish (December 11th, 2012)

  4. #3
    Super Moderator curmudgeon's Avatar
    Join Date
    Aug 2012
    Posts
    1,130
    My Mood
    Cynical
    Thanks
    64
    Thanked 139 Times in 134 Posts

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

    Also please read about cross-posting on the forum FAQ. Most here respect questioners who respect our right to enjoy our free time and to not waste it in cross-posts. You had two folks give you the same answer because you didn't provide links.

  5. #4
    Junior Member
    Join Date
    Dec 2012
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

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

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

    String s= s1+s2;

    String n = "Hello world";


    if (n.equals(s)) System.out.println(n); => "Hello world" yes work Thank you

Similar Threads

  1. Happy Pi Day ; a Pi Game!
    By JRabbit in forum What's Wrong With My Code?
    Replies: 4
    Last Post: March 15th, 2012, 08:22 AM
  2. HAPPY HOLIDAYS TO FELLOW MATES :D
    By chronoz13 in forum Totally Off Topic
    Replies: 4
    Last Post: January 9th, 2012, 05:15 AM
  3. Hi all.. happy to joint you all
    By suganthant in forum Member Introductions
    Replies: 2
    Last Post: November 16th, 2011, 10:33 AM
  4. Off Topic: Happy Songs?
    By KevinWorkman in forum The Cafe
    Replies: 5
    Last Post: March 3rd, 2011, 09:46 PM