Method with throws Exception: Where is it actually handled?

Posted by Esq on Stack Overflow See other posts from Stack Overflow or by Esq
Published on 2013-11-09T21:47:16Z Indexed on 2013/11/09 21:53 UTC
Read the original article Hit count: 232

Here is an example code, I am throwing an exception here, it works perfectly fine without the try/catch block of code for some reason.

Do I have to handle this inside this method "EntryDelete" or Do I have to handle this where the method is called from? If so can I see an example, what do I have to import in there? What is the acceptable syntax or method to do this?

public boolean EntryDelete(int entryId) throws SQLException{
    this.open();
    kDatabase.delete(kENTRY_TABLE, kENTRY_ENTRY_ID + "=" + entryId, null);
    this.close();
    return true;            
}   

Thanks

© Stack Overflow or respective owner

Related posts about java

Related posts about android