Results 1 to 2 of 2

Thread: What happens when object is created in JAVA

  1. #1

    Default What happens when object is created in JAVA

    Several things happen in a particular order to ensure the object is constructed properly:

    1. Memory is allocated from heap to hold all instance variables and implementation-specific data of the
    object and its superclasses. 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
    consctructor for its superclasses. This process continues until the constrcutor 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.

  2. #2


    Whenever an object created in JAVA it makes some specific data storage system. The object can be used in any function and also for the class of JAVA programming. As above given information, the object automatically includes its default values when it defined. Mostly, all programming system require object so, it effects on every parts of java programming.
    Last edited by brainusa; 10-09-12 at 02:08 PM.

Similar Threads

  1. Elements of object oriented language
    By puneet167 in forum C, C++, C#
    Replies: 1
    Last Post: 11-06-12, 06:29 PM
  2. Why was live chat created?
    By jasoncarey in forum Computers and Gadgets
    Replies: 1
    Last Post: 13-04-10, 10:34 AM
  3. Replies: 0
    Last Post: 14-03-09, 08:57 PM
  4. Replies: 0
    Last Post: 18-07-08, 08:01 AM
  5. C++ - Created any cool programs?
    By paramita0101 in forum Programming
    Replies: 2
    Last Post: 10-03-08, 12:47 PM

Share this page with your friends

Share this page with your friends

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts