aspose file tools*
The moose likes Servlets and the fly likes init method code ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "init method code ?" Watch "init method code ?" New topic
Author

init method code ?

Rahul Juneja
Ranch Hand

Joined: Aug 03, 2002
Posts: 425
Will this Code work fine ? Please note super.init() is not the first line.



Rahul Juneja
ThoughtClicks - http://techlabs.thoughtclicks.com
Nathaniel Stoddard
Ranch Hand

Joined: May 29, 2003
Posts: 1258
If your question is actually "Can I call 'super.init' anywhere in a method and not necessarily on the first line: yes, you can. A call to a super constructor has to be the first line, or a call to a separate constructor has to be on the first line. But calling an overridden method can be done at any point in the method.


Nathaniel Stodard<br />SCJP, SCJD, SCWCD, SCBCD, SCDJWS, ICAD, ICSD, ICED
 
 
subject: init method code ?