A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Programmer Certification (SCJP/OCPJP)
Exceptions Handling in Constructors
Joined: Sep 26, 2000
Nov 17, 2000 16:24:00
Can anyone tell me how do I catch and handle exceptions within my constructor.
Enthuware Software Support
Joined: Sep 23, 2000
Nov 17, 2000 16:42:00
It's exactly same as the way you throw/catch exceptions in any method.
Get Certified, Guaranteed!
(Now Revised for the new
Enthuware - Best Mock Exams and Questions for Oracle Java Certifications
Quality Guaranteed - Pass or Full Refund!
Author and all-around good cowpoke
Joined: Mar 22, 2000
Nov 17, 2000 17:42:00
However, unless the exception is something that you can recover from and still produce a valid object, it is better to let the constructor throw the exception and handle the problem somewhere else.
2 Exam Prep
Java 2 (Exam Cram)
Java Developer's Guide to
Java Developer's Guide to E-Commerce with XML and JS
I agree. Here's the link:
subject: Exceptions Handling in Constructors
executeBatch() not executing
my query is successfully running in database but it is returning empty resultset in my java program
writing from a jar
Questions from mock Exam !!!
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015