This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How many Object java will create

 
Satendra Singh
Greenhorn
Posts: 9
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
String s1 = "abc";
String s2 = "def";

s1 = s1+ s2;

 
Rob Spoor
Sheriff
Pie
Posts: 20512
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch!

Why don't you start by telling us how many objects you think will be created? And if you want an answer, I suggest you SearchFirst because this exact example has come up before a few times.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic