write a proram using exceptional handling create a error &
display the message "THERE IS AN ERROR?... PLEASE RECTIFY"?

Answer Posted / ankit

try
{

int a;
int b=0;

a=10/b;

}catch(Exception e)
{
System.out.println("error");

Is This Answer Correct ?    5 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Teta-Omeg-Big-Oh Show that f(n) = n2 + 3n3 is ;(n3).

3193


how to diplay a external image of output on winxp by using c & c++,

2938


write a program using virtual function to find the transposing of a square matrix?

2845


write a program that prompt the user to enter his height and weight,then calculate the body mass index and show the algorithm used

4310


U hv to enter a range from a and b and search hw many no. of times a pattern n. occurs between the range a and b. Eg :i/p:enter range :0 100 Enter pattern: 13 o/p: the no. times 13 occurred betwwn 0 to 100:1 Eg :i/p:enter range :100 1000 Enter pattern: 13 o/p: the no. times 13 occurred betwwn 100 to 1000: (in this 13,113,131,132,133…139,213,313,…913 all these will be counted)

2125






how to take time as input in the format (12:02:13) from user so that controls remains between these columns?

1817


How to swap two ASCII numbers?

2450


find level of following tree (state, parent) " J,D I,D H,C E,B F,B G,C B,A D,A C,A A,& K,E L,E L,F M,F N,G O,H P,I P,H Q,I R,J S,K U,P T,L

2010


Write a program that print in screen a tree with its height taken from user by entering number of 4 digits and find the odd numbers then calculate the sum of odd numbers so he get the height of tree?

2915


Write a C/C++ program that connects to a MySQL server and displays the global TIMEZONE.

4579


output for printf("printf");

1985


write a program to perform generic sort in arrays?

2627


i really need help about this.. write a program to display the set of odd and even numbers separately. find the highest and lowest value of the given numbers.

1970


Given a table of the form: Product Sold on A 1/1/1980 B 1/1/1980 C 1/1/1980 A 1/1/1980 B 1/1/1980 C 2/1/1980 A 2/1/1980 There are 30 products and 10,000 records of such type. Also the month period during which sales happened is given to u. Write the program to display the result as: Product Month No. of copies A January 12 A February 15 A March 27 B January 54 B February 15 B March 10 C January 37

2051


We need to write the function to check the password entered is correct or not based on the following conditions.. a) It must have atleast one lower case character and one digit. b)It must not have any Upper case characters and any special characters c) length should be b/w 5-12. d) It should not have any same immediate patterns like abcanan1 : not acceptable coz of an an pattern abc11se: not acceptable, coz of pattern 11 123sd123 : acceptable, as not immediate pattern adfasdsdf : not acceptable, as no digits Aasdfasd12: not acceptable, as have uppercase character

3957