Win a copy of Learn Spring Security (video course) this week in the Spring forum!
    Bookmark Topic Watch Topic
  • New Topic

String s = new String("abc"); //two objects??

 
Max White
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Report post to moderator
K&B says that the above statement creates two objects and one reference variable.I can see clearly see one reference and one object.Where is the second object?

Thanks..
 
Campbell Ritchie
Sheriff
Posts: 48363
56
  • Mark post as helpful
  • send pies
  • Report post to moderator
I think you have got the answer on your other thread, so I shall close this one.
Please avoid asking the same question twice.
 
    Bookmark Topic Watch Topic
  • New Topic