This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes One more on Constructor 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 "One more on Constructor" Watch "One more on Constructor" New topic
Author

One more on Constructor

suresh kamsa
Ranch Hand

Joined: Jul 30, 2001
Posts: 149

Could anyone tell me why l1 is compile error?
How do aviod that error to make the program error
free?
May Pat
Ranch Hand

Joined: Jul 01, 2002
Posts: 32
P.m1() is throwing an exception. When you make the call, you will need a try catch block. But on l1, you don't have the try catch block. So you get a compiler error.


May P.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: One more on Constructor
 
It's not a secret anymore!