Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes how many objects are created? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "how many objects are created?" Watch "how many objects are created?" New topic
Author

how many objects are created?

ravisankar sankar
Greenhorn

Joined: Jul 22, 2011
Posts: 29

Hi everyone

this is ravisankar as a new scjp aspirant and very new to this forum. I have been studying k&B book for a month. my weak areas are garbage collection, generics, regex, how many objects are created like question, Iam not able to give any good answer. Iam throughly practising scjpmocktest http://www.coderanch.com/how-to/java/ScjpMockTests questions.



please explain me how?
Ogeh Ikem
Ranch Hand

Joined: May 13, 2002
Posts: 180
Welcome to JavaRanch

You might find this useful http://www.javaranch.com/journal/200409/Journal200409.jsp#a1
swapnil kataria
Ranch Hand

Joined: Feb 26, 2011
Posts: 64
ravisankar sankar wrote:Hi everyone

this is ravisankar as a new scjp aspirant and very new to this forum. I have been studying k&B book for a month. my weak areas are garbage collection, generics, regex, how many objects are created like question, Iam not able to give any good answer. Iam throughly practising scjpmocktest http://www.coderanch.com/how-to/java/ScjpMockTests questions.



I think there will be three objects, one for "this is string", second for "new String" and third also for "new String" which remain at pool
please explain me how?
Ash Gill
Ranch Hand

Joined: Jun 30, 2011
Posts: 71
yes, i second Swapnil
ravisankar sankar
Greenhorn

Joined: Jul 22, 2011
Posts: 29

thanks Ogeh Ikem,

I will go through this entire link and keep try to understand. thanks many.
 
Don't get me started about those stupid light bulbs.
 
subject: how many objects are created?
 
Similar Threads
String Objects Confusion
String literal Pool doubt
String objects
String Constant Pool question
How many number of string objects are created?