Explain what occur when an object is created in java, JAVA Programming

Assignment Help:

Explain what occur when an object is created in Java?


Related Discussions:- Explain what occur when an object is created in java

Activity diagram, The statechart diagrams and activity diagram are related ...

The statechart diagrams and activity diagram are related in a sense that statechart diagram refers on object undergoing a transition process and an activity diagram refers on the f

Need to develop chat application for j2me, Need to develop Chat application...

Need to develop Chat application for j2me and I want Image Processing code Project Description: We want a chat application for a community website. Image processing and co

Control structures, JavaScript supports the normal control structures: ...

JavaScript supports the normal control structures: The conditionals if, if...else, & switch; The iterations for, while, do...while, break, & continue;

For what purposes ftp is used in networks, For what purposes FTP is used in...

For what purposes FTP is used in networks? FTP is known as file transfer protocol it is basically used to download or upload files / data to a remote computer.

Array, how do you access a value of an array?

how do you access a value of an array?

Difference between boolean & operator and && operator, How can we define th...

How can we define the difference between the Boolean & operator and the && operator ?

Want a graph database for relationship mapping of entities, Want a graph da...

Want a graph database for relationship mapping of entities Project Description: I want a graph database for relationship mapping of entities, liable peoples. Also, the databa

MATLAB, Requested figure handle in use by another object, how do i fix this...

Requested figure handle in use by another object, how do i fix this?

What are the advantages of multimedia presentations, What are the advantage...

What are the advantages of multimedia presentations? Write any five. Following are the benefits of multimedia presentations: • Great tool for efficiently communicating ideas

Explain about core java, Java is increasingly used for middleware applicati...

Java is increasingly used for middleware applications to communicate among Server and clients. Java has features like multithreading, portability and networking capabilities. Chang

12/3/2013 1:36:08 AM

Several things occur in a particular order to ensure an object is constructed properly:

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

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

3. A constructor for the most derived class is invoked. The first thing a constructor does is call constructors for its super classes. This process continues until a constructor for java.lang. Object is known 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 initializes and initialization blocks are executed. Then the body of a constructor is executed. Thus, constructor for the base class completes first and constructor for the most derived class completes last.

 

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd