Results 1 to 2 of 2
Thread: Calling to missing super(); ??
- 08-16-2010, 04:48 AM #1
Calling to missing super(); ??
i was reading over the code on this link
http://svn.apache.org/viewvc/httpcom...o.java?view=co
and if you look at the constructor its making a call to its super class constructor which i assume is calling the object classes constructor, but whats the point of calling the objects class constructor?
is this common practice?Last edited by alacn; 08-16-2010 at 06:39 AM.
Teaching myself java so that i can eventually join the industry! Started in June 2010
- 08-16-2010, 11:30 AM #2
Senior Member
- Join Date
- Jun 2007
- Location
- Bali, Indonesia
- Posts
- 696
- Rep Power
- 6
I think it is a common practice in programming. If we call the parent constructor that mean we want our object initialization to include what the parent does. Then we add a specific constructor code for our new class.
Website: Learn Java by Examples
Similar Threads
-
calling variable using super super..
By Stephen Douglas in forum New To JavaReplies: 7Last Post: 08-16-2010, 06:12 AM -
this() and super() ?
By bob in forum New To JavaReplies: 4Last Post: 08-13-2009, 04:56 PM -
this() vs super()
By Hevonen in forum New To JavaReplies: 9Last Post: 12-04-2008, 01:43 PM -
Super CSV 1.15
By JavaBean in forum Java SoftwareReplies: 0Last Post: 10-16-2007, 06:37 PM -
Use super. or this.
By Marcus in forum New To JavaReplies: 1Last Post: 07-05-2007, 06:52 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks