Issue with Exception
I have written a small sample code to explain my question 

class Test  
{  
    try  
    {  
        //some code here  
    }  
    catch([b]Exceptio[/b]n e)  
    {  
        // some code here  
      
    }  
}  

In catch block i have passed Exception. 

we can do it but we should not do it.Can you explain me why we should not do it. 

and second question is why exception are throw i mean to say 

suppose we create a servlet in that we write doget method like this 

public void doGet(HttpServletRequest request,HttpServletResponse response)throws ServletException 
{ }

i mean to say why we are throwing ServletException....which thing is causing to throw ServletException


Issue with Exception
===

I have written a small sample code to explain my question 

class Test  
{  
    try  
    {  
        //some code here  
    }  
    catch([b]Exceptio[/b]n e)  
    {  
        // some code here  
      
    }  
}  

In catch block i have passed Exception. 

we can do it but we should not do it.Can you explain me why we should not do it. 

and second question is why exception are throw i mean to say 

suppose we create a servlet in that we write doget method like this 

public void doGet(HttpServletRequest request,HttpServletResponse response)throws ServletException 
{ }

i mean to say why we are throwing ServletException....which thing is causing to throw ServletException

