Errors are arised when there is any logic problem with the logic of the program.
In this program we are trying to divide the number by zero which results in runtime error.
The code of the program is given below:
<HTML>
<HEAD>
<TITLE>Runtime Error in Jsp page</TITLE>
</HEAD>
<BODY>
<table align="center" bgcolor="#E1E1FF" border="1">
<H1>Runtime Error in Jsp page</H1>
<%
try{
int a = 10;
int b = 10;
b = a / 0; }
catch(Exception e){
out.println("The answer is " + e);
}
%>
</table>
</BODY>
</HTML>
|
Output of the Program:
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.
Ask Questions? Discuss: Runtime Errors
Post your Comment