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.


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

Results 1 to 2 of 2

Thread: String objects

  1. #1
    Junior Member
    Join Date
    Jul 2014
    My Mood
    Thanked 0 Times in 0 Posts

    Smile String objects

    please help me with this

    String s1="welcome";
    String s1=new String("welcome");

    what is the difference between this two type string object creation

  2. #2
    Super Moderator
    Join Date
    Jun 2013
    So. Maryland, USA
    My Mood
    Thanked 688 Times in 675 Posts

    Default Re: String objects

    We won't do your homework for you. If you search "java string literal," the results should give you the answers you need.

Similar Threads

  1. Sorting objects of an array by String name
    By esbowman in forum What's Wrong With My Code?
    Replies: 2
    Last Post: May 13th, 2013, 12:47 AM
  2. [Question] Objects instantiated within objects.
    By Xerosigma in forum Object Oriented Programming
    Replies: 6
    Last Post: April 25th, 2012, 10:53 AM
  3. Replies: 1
    Last Post: April 19th, 2012, 02:46 AM
  4. String objects
    By god1gracious in forum Java Theory & Questions
    Replies: 3
    Last Post: September 25th, 2011, 02:21 AM
  5. error when comparing 2 string objects
    By amr in forum What's Wrong With My Code?
    Replies: 5
    Last Post: February 9th, 2011, 06:36 PM