• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Constructors??

 
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


frnds,
without the constructor of the subclass throwing IOException..can i use keep the super in try catch block...
why 1 is not correct..

please explain..
 
Ranch Hand
Posts: 982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi...

super() must be the first statement in a constructor ...if you are trying to
write it yourself..

Below code gives compilation error ...stating that super should be the first statement in a constructor



Hope you got it

Whats the answer given in the source ....of this question..

Regards
[ November 04, 2005: Message edited by: A Kumar ]
 
srikanth reddy
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks kumar...i forgot this concept only...i suppose the answer was it could not be done ....without the subclass throwing the exception ...
thanks
 
reply
    Bookmark Topic Watch Topic
  • New Topic