import java.sql.Connection;
import java.sql.SQLException;
import java.sql.CallableStatement;
public class Main
{
private interface MyStatement extends CallableStatement{}
public void doit( Connection conn )
{
CallableStatement stmt = null;
MyStatement stmt2 = null;
try
{
stmt = conn.prepareCall( "xxx" );
stmt2 = (MyStatement) conn.prepareCall( "xxx" );
}
catch ( SQLException e )
{
e.printStackTrace();
}
finally
{
if ( stmt != null )
{
try { stmt.close(); } catch ( SQLException e ) { e.printStackTrace(); }
}
if ( stmt2 != null )
{
try { stmt2.close(); } catch ( SQLException e ) { e.printStackTrace(); }
}
}
}
}