The following example shows use of the throw keyword:public void someMethod( int div ) throws Exception1
{
    try 
    {
        if ( div == 0 )
            throw new Exception1( );
    }
    catch(Exception1 e1) 
    {
        // Exception can be handled in this catch
        // block
        .
        .
        .
    }
}