aspose file tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Constructors?? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "Constructors??" Watch "Constructors??" New topic
Author

Constructors??

srikanth reddy
Ranch Hand

Joined: Jul 28, 2005
Posts: 252


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..


Thanks & Regards<br /> <br />-Srikanth
A Kumar
Ranch Hand

Joined: Jul 04, 2004
Posts: 973
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

Joined: Jul 28, 2005
Posts: 252
thanks kumar...i forgot this concept only...i suppose the answer was it could not be done ....without the subclass throwing the exception ...
thanks
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Constructors??
 
Similar Threads
Abhilash Quiz
Re:constructors throwing exceptions
Constructor and Inheritance
Exceptions
from abhilash - constructors