Gurpreet Sachdeva For mock exams and other useful pages(including topics like bitshift operator, garbage collection,inner classes,etc) please visit: http://www.go4java.20m.com [This message has been edited by Gurpreet Sachdeva (edited August 18, 2001).]
Regards<BR>Gurpreet Sachdeva<P>For Mock Exams, FAQ, Exam tips and some useful information about Bitshift operator, inner classes, garbage collection,etc please visit: <A HREF="http://www.go4java.lookscool.com" TARGET=_blank rel="nofollow">http://www.go4java.lookscool.com</A>
Construtor can throw an exception, but cannot declare the exception in their header with the clause "throws
Farooq, I disagree with u in this respect. Constructors can throw any exception and also can declara in its header the unhandled exceptions it throws. See the following code.
Joined: May 08, 2001
You are rite Aazman, Thanks for pointing out. Is it the same for checked or unchecked exceptions. --Farooq
Joined: Jul 29, 2001
hi all, i am agree with ashik, it's a mistake in khalid book(page 101). if the constructor doesn't declare any checked exception in the header using throws clause then it would produce an error. ashok.