This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Java in General and the fly likes How many Object java will create Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "How many Object java will create" Watch "How many Object java will create" New topic
Author

How many Object java will create

Satendra Singh
Greenhorn

Joined: Jun 01, 2011
Posts: 9

String s1 = "abc";
String s2 = "def";

s1 = s1+ s2;

Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 20131
    
  30

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.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How many Object java will create
 
It's not a secret anymore!