It's not a secret anymore!*
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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
 
Similar Threads
Q of Dan's Mock Exam
Dan's mock question
Sub-class confusion...I thought I understood
Dan Chisholm Comprehensive Exam#1 Q#5
How to modify this program to use & display 1s and 0s instead of true and false?