• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Object Construction

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to understand the order that certain things are constructed in a object when you create it. I am getting tripped up on little questions that include when certain parts of the construction happen. Could someone help me with outlining the order of object construction? Here is what I understand:

1. Static blocks run
2. Constructor is called
3. No arg call to super is inserted, unless there is another call to super (with the same or other arguments)
4. Class variables are initialized
 
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One of the questions on my mock exam deals with that. Download the document version and have a look at the third question.

If that was not what you were looking for let us know
 
reply
    Bookmark Topic Watch Topic
  • New Topic