File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Can Constructors throw Exceptions?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Can Constructors throw Exceptions??" Watch "Can Constructors throw Exceptions??" New topic

Can Constructors throw Exceptions??

N Mukherjee
Ranch Hand

Joined: Jun 08, 2000
Posts: 141
Hi Everybody,
Can any constructor throw Exception?
Plz give reasons.Pardon my ignorance.

"Knowledge is Power"****************<A HREF="" TARGET=_blank rel="nofollow">THREAD/SCJP RESOURCES</A>
Bharatesh H Kakamari
Ranch Hand

Joined: Nov 09, 2000
Posts: 198
Tes Constructors can throw Exceptions.
The reason for constructors throwing exceptions are the same for any method throwing / handling Exceptions.
Hemal Mehta
Ranch Hand

Joined: Nov 16, 2000
Posts: 101
Constructors can have returns provided its just return;
I agree. Here's the link:
subject: Can Constructors throw Exceptions??
It's not a secret anymore!