• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

bean's lifecycle callback method

 
vitesse wei
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,This is another mock question about Bean's lifecycle callback method annotation,I think there is no correct answer,but given answer is C,anyoen agree with me?

Which is a valid Post Construct method in a message-driven bean class?
A. @PostConstruct
public boolean init() { return true; }
B. @PostConstruct
private static void init() {}
C. @PostConstruct
private void init() {}
D. @PostConstruct
public static void init() {}
 
Adam Tkaczyk
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Answer C is ok.
Here http://java.sun.com/javaee/5/docs/api/javax/annotation/PostConstruct.html
is explanation why.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic