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/Sun 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.
Java 2 Exam Prep
Java 2 (Exam Cram)
Java Developer's Guide to
Java Developer's Guide to E-Commerce with XML and JS
Java Resources at
I agree. Here's the link:
subject: Exceptions Handling in Constructors
writing from a jar
executeBatch() not executing
Questions from mock Exam !!!
my query is successfully running in database but it is returning empty resultset in my java program
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014