aspose file tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes exception doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "exception doubt" Watch "exception doubt" New topic
Author

exception doubt

vivek sivakumar
Ranch Hand

Joined: Aug 09, 2001
Posts: 187
package languagefundamentals;
import languagefundamentals.obj;
public class mainforinterface1 extends obj implements Interface1 {
public int doit(String s)
{
System.out.println(s);
return 0;
}
public static void main(String[] args) {
mainforinterface1 mymain = new mainforinterface1();
mymain.doit("vivek");
try {
mymain.finalize();// 1
}
catch(Exception Throwable){
}
}
}
well when i compile im getting a "mainforinterface1.java": Error #: 360 : unreported exception: java.lang.Throwable; must be caught or declared to be thrown at line 13, column 20
why is this problem ,


SCJP, SCWD <br />A farmer learns more from a bad harvest than a good one.
R K Singh
Ranch Hand

Joined: Oct 15, 2001
Posts: 5369
hope that helps


"Thanks to Indian media who has over the period of time swiped out intellectual taste from mass Indian population." - Chetan Parekh
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: exception doubt
 
Similar Threads
Hi to all
Creating own Exception
Exception Handing
regarding overriding with var agrs
100 times "hello world" without loop or recursive