1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

how many objects r created

Discussion in 'Java' started by shyam_oec, Feb 24, 2008.

  1. shyam_oec

    shyam_oec New Member

    Joined:
    Nov 26, 2007
    Messages:
    89
    Likes Received:
    1
    Trophy Points:
    0
    Occupation:
    Software Developer, .NET Framework
    Location:
    Jamshedpur
    1. StringBuffer s1 = new StringBuffer("abc");
    2. StringBuffer s2 = s1;
    3. StringBuffer s3 = new StringBuffer("abc");
    How many objects are created ?
     
  2. dilip.klose

    dilip.klose New Member

    Joined:
    Mar 10, 2008
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    three objects are created
     

Share This Page