Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Java in General
Search Coderanch
Advance search
Google search
Register / Login
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
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Java in General
@PostConstruct Vs Static block
kri shan
Ranch Hand
Posts: 1491
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Which one loads first (method with @PostConstruct annotation or static block) ?
Jeff Verdegan
Bartender
Posts: 6109
6
I like...
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I assume you mean, "Which one
executes
first?"
The answers to that are:
1) Please
SearchFirst
(⇐click).
and
2) After researching, what do
you
think, and why?
kri shan
Ranch Hand
Posts: 1491
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Both executes at same time.
Campbell Ritchie
Marshal
Posts: 79179
377
posted 10 years ago
1
Number of slices to send:
Optional 'thank-you' note:
Send
kri shan wrote:
Both executes at same time.
You would appear not to have read the documentation for post construct.
kri shan
Ranch Hand
Posts: 1491
posted 9 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Order of loading:
static initialization blocks, constructor, dependency injection setters, @PostConstruct methods.
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
?
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
static synchronized block
local class
Need to use a bean inside static block of another bean
suppourt for Annotation Programming . In servlets
bean's lifecycle callback method
More...