File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
EJB 3 in Action
this week in the
EJB and other Java EE Technologies
Programmer Certification (SCJP/OCPJP)
Creating String Objects
Joined: Feb 04, 2005
Feb 05, 2005 01:48:00
this was a question i stumbled upon
The answer says that 4 String objects are created can someone give me an explanation as to how 2 string objects are being created in the first line...
Joined: Sep 24, 2003
Feb 05, 2005 02:51:00
A String instance is created that represents the String literal, which is passed to the String(String) constructor to create yet another String instance.
Java Q&A (FAQ, Trivia)
I agree. Here's the link:
subject: Creating String Objects
How many object created ?
Query in Strings -Pass by Reference
number of objects created?
Hom many Objects are created ???
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014