Which is the Best Java Web Framework ?

Java - Describe the sequence of activities that happens When an Object is created in Java.

1. Memory is allocated from heap to hold all instance variables and implementation-specific data of the object and its super classes. Implemenation-specific data includes pointers to class and method data.


2. The instance variables of the objects are initialized to their default values.



3. The constructor for the most derived class is invoked. The first thing a constructor does is call the constructor for its super classes. This process continues until the constructor for java.lang.Object is called,
as java.lang.Object is the base class for all objects in java.


4. Before the body of the constructor is executed, all instance variable initializers and initialization blocks are executed. Then the body of the constructor is executed. Thus, the constructor for the base class completes first and constructor for the most derived class completes last.
Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
Enter your email address:
Delivered by FeedBurner
comments powered by Disqus




×

Try our new Java Interview Questions Search Tool.

There are more than 1000 questions with practice tests.

It's updated daily and It's Awesome.


×

Try our new Java Practice Test tool.

There are more than 200 questions and expanding quickly. It's updated daily and It's Awesome.