aspose file tools*
The moose likes Beginning Java and the fly likes String Objects Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "String Objects" Watch "String Objects" New topic
Author

String Objects

Shreya Raina
Greenhorn

Joined: Sep 17, 2011
Posts: 1
hello Everyone!!

Please answer this for mee..
If
String s1="abc"
and
String s2=s1+ "def"

How many objects are created and how??

Thanks!!
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39828
    
  28
Welcome to the Ranch.
You need three objects: a pencil, an eraser (probably the most important ) and a sheet of paper. You write down a short description of each object, whether it is created at runtime or when the class is loaded, and then you count them.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: String Objects