This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes How many string object created in this code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "How many string object created in this code" Watch "How many string object created in this code" New topic
Author

How many string object created in this code

Madhawi Maurya
Ranch Hand

Joined: Aug 22, 2007
Posts: 42
hi friend,

How many String objects will be created when this method is invoked?
Answer is given 3.
But it should be 5. that is
"fred"
"47"
"fred47"
"ed4" and
"ED4"

please clear me.


SCJP1.5 with 90%
Ravikanth kolli
Ranch Hand

Joined: Feb 10, 2008
Posts: 179

hi
This is a repitition of the question that is postedhere


-kolli
Madhawi Maurya
Ranch Hand

Joined: Aug 22, 2007
Posts: 42
thanks kolli
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How many string object created in this code