my dog learned polymorphism*
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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?

Gowher Naik
Ranch Hand

Joined: Feb 07, 2005
Posts: 643

How many objects are created in above piece of code
According to me there are 5 objects created as follows



Thanks
Aum Tao
Ranch Hand

Joined: Feb 14, 2006
Posts: 210
How many objects are created in the above code?

I think, you forgot t in Test14 t = new Test14();
[ July 29, 2006: Message edited by: Aum Tao ]

SCJP 1.4 85%
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How Many Objects Are Created?
 
Similar Threads
String variables in static method
Please explain me answer. (static)
can anyone explain this
Javabeat mock 2, question 14
code