Results 1 to 2 of 2
Thread: Calling to missing super(); ??
- 08-16-2010, 05:48 AM #1
Calling to missing super(); ??
i was reading over the code on this link
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 07:39 AM.Teaching myself java so that i can eventually join the industry! Started in June 2010
- 08-16-2010, 12:30 PM #2Senior Member
- Join Date
- Jun 2007
- Bali, Indonesia
- Rep Power
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
- By Stephen Douglas in forum New To JavaReplies: 7Last Post: 08-16-2010, 07:12 AM
- By bob in forum New To JavaReplies: 4Last Post: 08-13-2009, 05:56 PM
- By Hevonen in forum New To JavaReplies: 9Last Post: 12-04-2008, 02:43 PM
- By JavaBean in forum Java SoftwareReplies: 0Last Post: 10-16-2007, 07:37 PM
- By Marcus in forum New To JavaReplies: 1Last Post: 07-05-2007, 07:52 AM