File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

exception doubt

 
vivek sivakumar
Ranch Hand
Posts: 187
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ,
 
R K Singh
Ranch Hand
Posts: 5382
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hope that helps
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic