Enthuware - Best Mock Exams and Questions for Oracle Java Certifications
Quality Guaranteed - Pass or Full Refund!
Paul Anilprem wrote:When you create an unreferenced object of a regular class (such as new String() or whatever), you are doing it for the side effects of the constructor because the object itself will most probably be garbage collected. You should not rely on this though because the JVM may even optimize the call away.
Richard Hayward wrote:
Paul Anilprem wrote:When you create an unreferenced object of a regular class (such as new String() or whatever), you are doing it for the side effects of the constructor because the object itself will most probably be garbage collected. You should not rely on this though because the JVM may even optimize the call away.
So I can't be sure that the Dog will bark?
I thought that was guaranteed.
Enthuware - Best Mock Exams and Questions for Oracle Java Certifications
Quality Guaranteed - Pass or Full Refund!
Stephan van Hulst wrote:You're not performing assignment, an increment/decrement operation, a method invocation or class instance creation.
An object is a class instance or an array.
Every array has an associated Class object, shared with all other arrays with the same component type.
Although an array type is not a class, the Class object of every array acts as if:
The direct superclass of every array type is Object. Every array type implements the interfaces Cloneable and java.io.Serializable.
Richard Hayward wrote:if I get an array's class and then use reflection to examine its constructors, I find that it hasn't got any, so I don't see how the array could have been created.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |