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
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 #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, 06:12 AM
- By bob in forum New To JavaReplies: 4Last Post: 08-13-2009, 04:56 PM
- By Hevonen in forum New To JavaReplies: 9Last Post: 12-04-2008, 01:43 PM
- By JavaBean in forum Java SoftwareReplies: 0Last Post: 10-16-2007, 06:37 PM
- By Marcus in forum New To JavaReplies: 1Last Post: 07-05-2007, 06:52 AM